Changeset 13609
- Timestamp:
- 04/29/2024 07:02:02 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
r13607 r13609 768 768 * @return bool True if the email was updated, false otherwise. 769 769 */ 770 public function update_review_email( $post, $attachment ) {770 public static function update_review_email( $post, $attachment ) { 771 771 $review_email = self::find_review_email( $post ); 772 772 if ( ! $review_email ) { … … 789 789 $name = wp_get_current_user()->display_name ?: wp_get_current_user()->user_login; 790 790 $payload = [ 791 'customer' => [792 'firstName' => explode( ' ', $name, 2 )[0],793 'lastName' => trim( explode( ' ', "{$name} ", 2 )[1]),791 'customer' => array_filter( [ 792 'firstName' => substr( explode( ' ', $name, 2 )[0], 0, 39 ), 793 'lastName' => trim( substr( explode( ' ', "{$name} ", 2 )[1], 0, 39 ) ), 794 794 'email' => wp_get_current_user()->user_email, 795 ] ,795 ] ), 796 796 'text' => $text, 797 797 'status' => 'active',
Note: See TracChangeset
for help on using the changeset viewer.