Advertisement
verygoodplugins

Untitled

Sep 11th, 2023
982
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1.  
  2. function force_sync_separate_attendees( $update_data, $attendee, $order_id ) {
  3.  
  4.     $order = wc_get_order( $order_id );
  5.  
  6.     if ( $update_data['user_email'] === $order->get_billing_email() ) {
  7.         $update_data['user_email'] = str_replace( '@', '+billing@', $update_data['user_email'] );
  8.     }
  9.  
  10.     return $update_data;
  11.  
  12. }
  13.  
  14. add_action( 'wpf_woocommerce_attendee_data', 'force_sync_separate_attendees', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement