How To Add Custom Fees on Woocommerce Checkout Page Without Plugin | Add Custom fee without plugin
//code
function merchant_handling_fee() {
global $woocommerce;
if ( is_admin() && ! defined( 'DOING_AJAX' ) )
return;
// allow testing with 100% coupon
//if ( sizeof( $cart->get_applied_coupons() ) > 0 )
// return;
$fee = 5.00;
$woocommerce->cart->add_fee( 'Merchant Processing Fee', $fee, true, 'standard' );
}
Comments
Post a Comment