Show Tax row in my invoice using Woocommerce Print Invoices & Packing lists

筅森魡賤 提交于 2019-12-25 01:44:39

问题


I opened a previous thread about forcing WooCommerce to show the Tax name in the checkout page of WooCommerce even if the rate is 0.000%, as I need that information to be displayed (VAT rates in my store are always 0% due to a VAT extemption regime, but it needs to be displayed). See the image below about how Taxes are currently managed:

I used this code in my function.php file to force WooCommerce to display the Tax name in Cart or during Checkout:

add_filter( 'woocommerce_cart_hide_zero_taxes', '__return_false' ); 

It works, and this is the result, the Tax name is displayed right before the Total row:

The problem comes when using the extension called Woocommerce Print Invoices & Packing lists, which is supposed to show the same stuff during the checkout, but the table row about Taxes is completely missing, check how the table appears in the Invoice:

Any ideas to force the displaying of the Tax name like the Checkout example above? Any help is appreciated.


回答1:


I think I found the answer. This worked for me with 'WooCommerce PDF Invoices and Packing Slips'.

WooCommerce PDF Invoice showing zero tax

Add this line to functions.php to display zero tax on the site:

add_filter( 'woocommerce_cart_hide_zero_taxes', '__return_false' ); 

Add this line to display zero tax on your invoices:

add_filter( 'woocommerce_order_hide_zero_taxes', '__return_false' );

I hope this works for you.



来源:https://stackoverflow.com/questions/50506596/show-tax-row-in-my-invoice-using-woocommerce-print-invoices-packing-lists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!