简体   繁体   English

如何从 WooCommerce 中的自定义 COD 附加费中排除税款?

[英]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我已使用Woocommerce 代码中的货到付款方式 (cod) 添加费用来添加 COD 附加费

I want to have this charge excluded from VAT & no VAT/TAX shall be applied to it.我想将此费用排除在增值税之外,并且不征收增值税/税款。

Any help will be appreciated.任何帮助将不胜感激。

To have that COD surcharge not taxable, you will replace in the code:要使该 COD 附加费不征税,您将在代码中替换:

$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 )由于WC_Cart add_fee()方法中的第三个参数是“应税”( truefalse


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"由于WC_Cart add_fee()方法中的第四个参数是“税类”

See: Set a Zero tax rate on a cart fee in WooCommerce请参阅: 在 WooCommerce 中对购物车费用设置零税率

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM