It is good to understand that in WooCommerce, there is a distinct difference between the sale price of a product and a discount. The price difference between your sale price and regular price of a product will not show up on your PDF documents when working with the ‘Discount’ block in the Customizer. Here is why.
Sale Price #
The sale price is set on the product level and applies only to that specific product or product variation.
WooCommerce does not treat the sale price as a discount. It simply sets it as the price of your product in the order, without any notification that the regular price of the product is in fact higher.
Therefore, when using the Discount block in the Customizer, no discount will be displayed. We do offer a Regular price block that will display the initial price of your product in a separate column.
Discount #
A WooCommerce discount is applied to the whole order, usually in the form of a coupon. You can clearly see in the order details, a discount has been applied to your order.
Using a Discount block in either the columns or totals section of the Customizer will display this discount on your PDF documents.
Showing the price difference between the sale price and regular price #
We do offer a way of getting the price difference between the sale price and regular price on to your PDF documents, so you can show your customer the money they saved by buying your on-sale product(s).
For this, you will have to use a Static text block in the columns’ section of the Customizer and use one of the following placeholders:
- {{sale_price_discount_excl_tax}}
- {{sale_price_discount_incl_tax}}
- {{sale_price_discount_percent}}
Which will show the price difference excluding tax, including tax or as a percentage respectively.