970b4319 by Jeff Balicki

sss

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 4fc316cf
...@@ -424,3 +424,23 @@ function display_custom_meta_data_in_backend_orders( $order ){ ...@@ -424,3 +424,23 @@ function display_custom_meta_data_in_backend_orders( $order ){
424 424
425 add_action('wp_ajax_ajax_apply_coupon', 'ajax_apply_coupon'); 425 add_action('wp_ajax_ajax_apply_coupon', 'ajax_apply_coupon');
426 add_action('wp_ajax_nopriv_ajax_apply_coupon', 'ajax_apply_coupon'); 426 add_action('wp_ajax_nopriv_ajax_apply_coupon', 'ajax_apply_coupon');
427
428
429
430 /**
431 * Add a standard $ value surcharge to all transactions in cart / checkout
432 */
433 add_action( 'woocommerce_cart_calculate_fees','wc_add_surcharge' );
434 function wc_add_surcharge() {
435 global $woocommerce;
436
437 if ( is_admin() && ! defined( 'DOING_AJAX' ) )
438 return;
439
440 $county = array('CAN');
441 // change the $fee to set the surcharge to a value to suit
442 $fee = 1.00;
443
444 $woocommerce->cart->add_fee( 'Processing Fees', $fee, true, 'standard' );
445
446 }
...\ No newline at end of file ...\ No newline at end of file
......