Changeset 2296 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php
- Timestamp:
- 01/14/2016 03:21:54 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php
r2292 r2296 435 435 436 436 case 'requester': 437 $value = $this->get_requester_formatted_email( $post->post_author );437 $value = WordCamp_Budgets::get_requester_formatted_email( $post->post_author ); 438 438 break; 439 439 … … 477 477 478 478 return $value; 479 }480 481 /**482 * Get the e-mail address of the requester in `Name <address>` format483 *484 * @param int $post_author_id485 *486 * @return false|string487 */488 protected function get_requester_formatted_email( $post_author_id ) {489 $address = false;490 $requester = get_user_by( 'id', $post_author_id );491 492 if ( is_a( $requester, 'WP_User' ) ) {493 $address = sprintf( '%s <%s>', $requester->get( 'display_name' ), $requester->get( 'user_email' ) );494 }495 496 return $address;497 479 } 498 480 … … 599 581 */ 600 582 protected function notify_requester_payment_made( $request_id, $post_data ) { 601 if ( ! $to = $this->get_requester_formatted_email( $post_data['post_author'] ) ) {583 if ( ! $to = WordCamp_Budgets::get_requester_formatted_email( $post_data['post_author'] ) ) { 602 584 return; 603 585 } … … 630 612 */ 631 613 protected function notify_requester_request_incomplete( $request_id, $post_data, $post_data_raw ) { 632 if ( ! $to = $this->get_requester_formatted_email( $post_data['post_author'] ) ) {614 if ( ! $to = WordCamp_Budgets::get_requester_formatted_email( $post_data['post_author'] ) ) { 633 615 return; 634 616 }
Note: See TracChangeset
for help on using the changeset viewer.