I’m wondering how can I exclude the Cash on Delivery Surcharge from Taxes?
I have used Add fee for Cash on delivery payment method (cod) in Woocommerce code to add the COD Surcharge
I want to have this charge excluded from VAT & no VAT/TAX shall be applied to it.
Any help will be appreciated.
Advertisement
Answer
To have that COD surcharge not taxable, you will replace in the code:
$cart->add_fee( 'Handling', $fee, true );
by:
$cart->add_fee( 'Handling', $fee, false );
As the third argument in
WC_Cart
add_fee()
method is “taxable” (true
orfalse
)
Or if you have set a “Zero Rate” on your tax settings, you can also use instead:
$cart->add_fee( 'Handling', $fee, true, 'zero-rate' );
As the fourth argument in
WC_Cart
add_fee()
method is “tax class”