Advertisement
eventsmanager

Waitlists: prevent overriding personal details

May 6th, 2024
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function waitlists_em_booking_save( $result, $EM_Booking ){
  2. global $wpdb;
  3.  
  4. if ( $EM_Booking->booking_meta['waitlist'] && ($EM_Booking->booking_status == 6 || $EM_Booking->booking_status == 7) ){
  5. $data = array( 'person_id' => 0 );
  6. $where = array( 'booking_id' => $EM_Booking->booking_id );
  7. $result= $wpdb->update( EM_BOOKINGS_TABLE, $data, $where);
  8. }
  9.  
  10. return $result;
  11. }
  12. add_filter('em_booking_save', 'waitlists_em_booking_save', 100, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement