Advertisement
eventsmanager

Custom #_WAITLIST_BOOKING_URL Placeholder

Nov 29th, 2023
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. add_filter('em_booking_output_placeholder','my_em_placeholders_custom_bookingid',100,3);
  2. function my_em_placeholders_custom_bookingid($replace, $EM_Booking, $result){
  3. switch( $result ){
  4. case '#_WAITLIST_BOOKING_URL':
  5. $url = esc_url($EM_Booking->get_event()->get_permalink());
  6. $query_args = array('pno' => null, 'uuid' => $EM_Booking->booking_uuid, 'waitlist_booking' => 1);
  7. if( $EM_Booking->person_id == 0 ){
  8. $query_args['email'] = urlencode($EM_Booking->booking_meta['registration']['user_email']);
  9. }
  10. $replace = add_query_arg( $query_args, $url );
  11. break;
  12. }
  13. return $replace;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement