Advertisement
eventsmanager

Custom #_TICKETBOOKINGATTENDEEDATA placeholder

Jan 23rd, 2025 (edited)
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. add_filter('em_booking_output_placeholder','my_em_custom_booking_phone',100,3);
  2. function my_em_custom_booking_phone($replace, $EM_Booking, $result){
  3. if( $result === '#_TICKETBOOKING_ATTENDEE_DATA' || $result === '#_TICKETBOOKINGATTENDEEDATA' ){
  4. $replace = '';
  5. $Attendees = EM_Attendees_Form::get_booking_attendees($EM_Booking);
  6. $EM_Tickets_Bookings = $EM_Booking->get_tickets_bookings();
  7. foreach( $EM_Tickets_Bookings->tickets_bookings as $EM_Ticket_Booking ){
  8. foreach( $Attendees[$EM_Ticket_Booking->ticket_id] as $attendee_title => $attendee_data ){
  9. foreach( $attendee_data as $field_label => $field_value){
  10. $replace .= "\r\n". $field_label .': ';
  11. $replace .= $field_value;
  12. }
  13. }
  14. }
  15.  
  16.  
  17. }
  18. return $replace;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement