Customers use various coupons to redeem discounts on products in an online store. Store owners can display these discounts on invoices as an amount and percentage for each product by adding a custom code snippet to their WordPress site. In the invoice, separate columns will show the discount amount and percentage.
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:
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.