With WooCommerce and WooCommerce PDF Invoices & Packing Slips plugins, I have an issue. When PDF Invoices are generated, they shows the TAX two times:
I need to remove this duplication to make it looks like this:
I Know there are a few Premium Plugins with a mass of functions but I can not buy Premium Plugins anymore, as invested too much in other Plugins.
So I will need to make that little change. I can’t find any solution for this.
Can anyone help me with that?
Yes, you can edit the default templates to fit your needs, without buying the premium one, but you need inside your active child theme or theme (if it doesn’t exist yet):
woocommerce
plugins
>woocommerce-pdf-invoices-packing-slips
>templates
>pdf
to this newly fresh createdwoocommerce
folder.pdf
folder, renamesimple
subfolder with something likecustom1
(or whatever you want).custom1
pdf template, going in admin backend at:WooCommerce
>PDF Invoices
>Template
(tab), selectcustom1
* in and **save.Now in your active theme >
woocommerce
>pdf
>custom1
you can customize the templates files included to feet your needs.1. Retrieving the slug (key name) for VAT duplicate value:
As you say, adding something inside this loop make it reproduce in each displayed element.
Here we are going to display the
key
names or slugs just after the correspondingvalues
:2. Adding a conditional in the loop to avoid displayed repetition:
Now that you know the
key
name of the duplicated element you can act on the loop with anif()
statement inside it. You will have to replace'the_key_name'
by the realkey
name of the duplicated item:Et voilà ⦠Bon appétit 🙂
If you are looking for a free alternative, the plugin WooCommerce PDF Invoices and Packing Slips might help. The plugin does allow you to add tax in your invoice and you can check if this helps for your specific situation.