使用 Woocommerce Print Invoices & 在我的发票中显示税行装箱单 [英] Show Tax row in my invoice using Woocommerce Print Invoices & Packing lists

查看:23
本文介绍了使用 Woocommerce Print Invoices & 在我的发票中显示税行装箱单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打开了一个

我在我的 function.php 文件中使用此代码强制 WooCommerce 在购物车或结帐期间显示税名:

add_filter('woocommerce_cart_hide_zero_taxes', '__return_false');

它起作用了,这就是结果,Tax name 显示在 Total 行之前:

使用名为 Woocommerce Print Invoices & 的扩展程序时会出现问题.装箱单,应该在结账时显示相同的东西,但是关于税的表格行完全丢失,检查表格在发票中的显示方式:

有什么想法可以像上面的 Checkout 示例那样强制显示税名?任何帮助表示赞赏.

解决方案

我想我找到了答案.这对WooCommerce PDF 发票和装箱单"很有用.

显示零税的 WooCommerce PDF 发票

将此行添加到functions.php以在网站上显示零税:

add_filter('woocommerce_cart_hide_zero_taxes', '__return_false');

添加此行以在您的发票上显示零税:

add_filter('woocommerce_order_hide_zero_taxes', '__return_false');

我希望这对你有用.

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.

解决方案

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.

这篇关于使用 Woocommerce Print Invoices & 在我的发票中显示税行装箱单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆