Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function alt_emails_for_attendees( $update_data, $registration ) {
- if ( ! $registration->is_primary_registrant() ) {
- $email_parts = explode( '@', $update_data['user_email'] );
- // Convert email@domain.com to email+firstname@domain.com
- $update_data['user_email'] = $email_parts[0] . '+' . strtolower( $update_data['first_name'] ) . '@' . $email_parts[1];
- }
- return $update_data;
- }
- add_filter( 'wpf_event_espresso_customer_data', 'alt_emails_for_attendees', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement