Advertisement
verygoodplugins

Untitled

Feb 3rd, 2020
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. function alt_emails_for_attendees( $update_data, $registration ) {
  2.  
  3.     $email_parts = explode( '@', $update_data['user_email'] );
  4.  
  5.     // Convert email@domain.com to email+firstname@domain.com
  6.  
  7.     $update_data['user_email'] = $email_parts[0] . '+' . strtolower( $update_data['first_name'] ) . '@' . $email_parts[1];
  8.  
  9.     return $update_data;
  10.  
  11. }
  12.  
  13. add_filter( 'wpf_event_espresso_customer_data', 'alt_emails_for_attendees', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement