Advertisement
eventsmanager

Add Event ID in the Admin bookings summary page and export

Apr 17th, 2023
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. function my_em_bookings_table_cols_template_eventid($template, $EM_Bookings_Table){
  2. $template['event_id'] = 'Event ID';
  3. return $template;
  4. }
  5. add_action('em_bookings_table_cols_template', 'my_em_bookings_table_cols_template_eventid',10,2);
  6.  
  7. function my_em_custom_booking_form_cols_eventid($val, $col, $EM_Booking, $EM_Bookings_Table, $csv){
  8. if( $col == 'event_id' ){
  9. $EM_Event = $EM_Booking->get_event();
  10. $val = $EM_Event->event_id;
  11. }
  12. return $val;
  13. }
  14. add_filter('em_bookings_table_rows_col','my_em_custom_booking_form_cols_eventid', 10, 5);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement