Skip to content
Advertisement

How can I exclude Taxes From a custom COD Surcharge in WooCommerce?

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 or false)


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”

See: Set a Zero tax rate on a cart fee in WooCommerce

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement