Properly displaying discounts on invoices enhances transparency, building customer confidence in online retailers. Showing both the discount amount and percentage for each item gives customers a clear view of their savings, increasing satisfaction. This is possible with WebToffee’s WooCommerce PDF Invoices, Packing Slips, and Credit Notes plugin, by adding a custom code snippet to your WordPress site. The discount amount and percentage will be shown in separate columns.
Showing product-wise discounts and discount percentages
Add the custom code snippet given below to your WordPress site to display product-wise discounts and discount percentages in separate columns within the product table of WooCommerce invoices.
You can add the custom code snippet to the active child theme’s functions.php file or use a third-party plugin for the addition. For more details on adding custom code snippets using a third-party plugin, check out the following article: Adding Custom Codes with a Third-Party Plugin.
The invoice document, after adding the custom code snippet, will look like this:
Gregory Brunner
January 19, 2025
Thank you for this code. How can I adjust the colors of the header of the new columns?
Sanjai Valsan
January 21, 2025
Hi Gregory Brunner,
Thank you for reaching out!
Yes, it is possible to customize the colors of the header of the new columns. However, this requires specific customizations that our customer support team can assist you with. Please feel free to contact them for assistance. They’ll be happy to help.
Pedro
July 17, 2024
I found this snippet yesterday, and it’s working great, but I have one problem. It’s showing up a discount on paid invoices, but on one of the sites, we take phone orders, and the payment is made later, and It will not show up before we mark it as paid.
Is there a way that it can show the discount even before it’s paid?
Thanks in advance
Sanjai Valsan
July 19, 2024
Hi Pedro,
Thank you for reaching out!
We’re glad to hear the snippet is working well for you. To fully understand and address your requirements, please contact our customer support team. They will be able to assist you more effectively.
Umang
July 8, 2024
Hi, this code is not working.
Sanjai Valsan
July 9, 2024
Hi Umang,
Thank you for reaching out!
We have tested the code and it is working fine on our end. It appears to be a site-specific issue. You may need technical assistance to resolve this. Please reach out to our customer support team to get the issue resolved.