eventsmanager

Booking Sub Total - without tax, discounts

Jul 8th, 2014
529
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. * after adding in your functions.php, go to Events > Bookings > Recent Bookings or by clicking an specific
  3. * http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
  4. * click on the Gear icon and drag&drop field "SubTotal"
  5. */
  6. function my_em_bookings_table_cols_template_subtotal($template, $EM_Bookings_Table){
  7. $template['sub_total'] = 'SubTotal';
  8. return $template;
  9. }
  10. add_action('em_bookings_table_cols_template', 'my_em_bookings_table_cols_template_subtotal',10,2);
  11.  
  12. function my_em_custom_booking_form_cols_subtotal($val, $col, $EM_Booking, $EM_Bookings_Table, $csv){
  13. if( $col == 'sub_total' ){
  14. $val = $EM_Booking->get_price_base(true);
  15.  
  16. }
  17. return $val;
  18. }
  19. add_filter('em_bookings_table_rows_col','my_em_custom_booking_form_cols_subtotal', 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.

×