SHARE
TWEET

Bookings Summary - Location Name

eventsmanager Feb 6th, 2014 (edited) 192 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * paste in your theme functions.php
  3.  * after adding in your functions.php, go to Events > Bookings > Recent Bookings or by clicking an specific
  4.  * click on the Gear icon and drag&drop field "Location Name"
  5.  */
  6.  
  7. function my_em_bookings_table_cols_template_location_name($template, $EM_Bookings_Table){
  8.     $template['location_name'] = 'Location Name';
  9.     return $template;
  10. }
  11. add_action('em_bookings_table_cols_template', 'my_em_bookings_table_cols_template_location_name',10,2);
  12.  
  13. function my_em_custom_booking_form_cols_location_name($val, $col, $EM_Booking, $EM_Bookings_Table, $csv){
  14.  
  15.     if( $col == 'location_name' ){
  16.        
  17.         $val = $EM_Booking->get_event()->get_location()->location_name;
  18.  
  19.     }
  20.  
  21.     return $val;
  22. }
  23. add_filter('em_bookings_table_rows_col','my_em_custom_booking_form_cols_location_name', 10, 5);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top