sss
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
1 changed file
with
21 additions
and
1 deletions
| ... | @@ -423,4 +423,24 @@ function display_custom_meta_data_in_backend_orders( $order ){ | ... | @@ -423,4 +423,24 @@ function display_custom_meta_data_in_backend_orders( $order ){ |
| 423 | } | 423 | } |
| 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'); | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 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 | ... | ... |
-
Please register or sign in to post a comment