eventsmanager

Bookings Summary Page Booked Tickets

Feb 2nd, 2019
423
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. *This snippet will let users display booked tickets under Events > Bookings > Recent Bookings > click the Gear or Cog Icon
  3. */
  4. function my_em_bookings_table_cols_template_tickettypes($template, $EM_Bookings_Table){
  5. $template['book_tickets'] = 'Booked Tickets';
  6. return $template;
  7. }
  8. add_action('em_bookings_table_cols_template', 'my_em_bookings_table_cols_template_tickettypes',10,2);
  9.  
  10. function my_em_custom_booking_form_cols_ticket_types($val, $col, $EM_Booking, $EM_Bookings_Table, $csv){
  11.  
  12. if( $col == 'book_tickets' ){
  13.  
  14. $EM_Tickets_Bookings = $EM_Booking->get_tickets_bookings();
  15. $attendee_datas = EM_Attendees_Form::get_booking_attendees($EM_Booking);
  16. $attendee_list = "";
  17. foreach( $EM_Tickets_Bookings->tickets_bookings as $EM_Ticket_Booking ){
  18.  
  19. //Display ticket info
  20. if( !empty($attendee_datas[$EM_Ticket_Booking->ticket_id]) ){
  21. $val .= "Ticket name: ".$EM_Ticket_Booking->get_ticket()->ticket_name."<br>";
  22. }
  23.  
  24.  
  25. }
  26.  
  27. }
  28.  
  29. return $val;
  30. }
  31. add_filter('em_bookings_table_rows_col','my_em_custom_booking_form_cols_ticket_types', 10, 5);
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×