Repository › Forums › Support › WooCommerce Pricing Rules PRO › Product Pricing Table show Percent %
Is is possible to show the percent of the discount on the product pricing table that is displayed when looking at the product detail view?
I looked through the forms here and didn’t see this addressed. I also looked in the code hoping there was a filter for this value, but I didn’t see one.
I just released 1.1.0 which has limited template support.
copy the file wp-content/plugins/soft79-wc-pricing-rules/templates/single-product/bulk-rule.php
I commented an example on how to calculate the discount percentage:
$discount_perc = round( ( $row["price"] - $product->get_price() ) * 100 / $product->get_price() ) . ' %';
Then replace $row["price_html"]; by $discount_perc and you’re good to go.