Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Note: using multiple bookings mode
- 1. paste this snippet at the end of your theme functions.php
- OR
- 2. using ftp, go to wp-content then create new folder name mu-plugins and then open this folder and
- 3. create new php file name functions.php then edit and paste this snippet > save
- 4. go to Events > Bookings and under Recent Bookings click on the Gear Icon and Drag new 'Sub Total' to the left
- */
- function my_em_bookings_table_cols_template_subtotal($template, $EM_Bookings_Table){
- $template['sub_total'] = 'Sub Total';
- return $template;
- }
- add_action('em_bookings_table_cols_template', 'my_em_bookings_table_cols_template_subtotal',10,2);
- function my_em_custom_booking_form_cols_subtotal($val, $col, $EM_Booking, $EM_Bookings_Table, $csv){
- if( $col == 'sub_total' ){
- if( get_option('dbem_multiple_bookings') ){
- $EM_Multiple_Booking = EM_Multiple_Bookings::get_main_booking($EM_Booking);
- if( $EM_Multiple_Booking !== false ){
- $EM_Booking = $EM_Multiple_Booking;
- }
- }
- $val = em_get_currency_formatted($EM_Booking->booking_price);
- }
- return $val;
- }
- add_filter('em_bookings_table_rows_col','my_em_custom_booking_form_cols_subtotal', 10, 5);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement