Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- This snippet will get the amount paid when you edit the bookings in the admin-dashboard and use Offline payment "Add Offline Payment"
- */
- function my_em_bookings_table_cols_template_amtpaid($template, $EM_Bookings_Table){
- $template['amt_paid'] = 'Amount Paid';
- return $template;
- }
- add_action('em_bookings_table_cols_template', 'my_em_bookings_table_cols_template_amtpaid',10,2);
- function my_em_custom_booking_form_cols_amtpaid($val, $col, $EM_Booking, $EM_Bookings_Table, $csv){
- global $wpdb;
- $paid_amount = $wpdb->get_var('SELECT sum(transaction_total_amount) FROM wp_em_transactions WHERE booking_id = '.$EM_Booking->booking_id);
- $val = em_get_currency_formatted($paid_amount);
- return $val;
- }
- add_filter('em_bookings_table_rows_col','my_em_custom_booking_form_cols_amtpaid', 10, 5);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement