It would be nice to have that already by default (noted down for future)
However atm you need to add a php snippet. Here’s a snippet used for something different, I haven’t tested it with a mod for location name, but hopefully enough for you to go on:
/**
* Adds columns in the bookings tables
* @param array $template
* @param EM_Bookings_Table $EM_Bookings_Table
* @return string
*/
function my_em_bookings_table_cols_template($template, $EM_Bookings_Table){
$template['location_name'] = 'Location Name';
return $template;
}
add_action('em_bookings_table_cols_template', 'my_em_bookings_table_cols_template',10,1);
function my_em_custom_booking_form_cols_txn_price($val, $EM_Booking){
return $EM_Booking->location_name;
}
add_filter('em_bookings_table_rows_col_transaction_price','my_em_custom_booking_form_cols_txn_price', 10, 3);
Thanks for your help
In wich file do I have to add this code ?
you can paste snippet in your theme functions.php
thanks
now I have a new column named Location Name but it is empty
maybe you can try this?
function my_em_bookings_table_cols_template($template, $EM_Bookings_Table){
$template['location_name'] = 'Location Name';
return $template;
}
add_action('em_bookings_table_cols_template', 'my_em_bookings_table_cols_template',10,2);
function my_em_custom_booking_form_cols_txn_price($val, $col, $EM_Booking, $EM_Bookings_Table, $csv){
return $EM_Booking->get_event()->get_location()->location_name;
}
add_filter('em_bookings_table_rows_col','my_em_custom_booking_form_cols_txn_price', 10, 5);
great !!! it works perfectly !
thanks to agelonwl and marcus !!