Discount badges showing wrong discount or not at all

You are here:
Estimated reading time: 1 min

Most common solution

First thing you should try is accessing WooCommerce > Status > Tools and click on Regenerate lookup tables and Clear transients .

Dealing with “0%” or “Save $0”

This can happen if a certain type of product type is not supported. With a bit of coding, custom product types can be restricted using a code like this one https://d.pr/n/AM7MiF .

Dealing with dynamic price plugins

When using a plugin that’s dynamically changing the price of the product, the way the product price is discounted, is not “friendly” with WooCommerce’s built-in is_on_sale() or get_sale_price() methods, and in Rey these are essential to calculate the discounts.

Things evolves so depending on the requests, i will try to create some sort of compatibility but it can take some time.

Disabling the internal caching mechanism

Sometimes, such as when using a multi-currency plugin, the badge might show different numbers. That likely happens because of the internal caching, and you can enable this by adding the code snippet below inside the child theme’s functions.php .

add_filter('reycore/woocommerce/cache_discounts', '__return_false');
Was this article helpful?
Dislike 0
Views: 83

Suggest article improvements

Please use this form to suggest improvements and report missing or outdated content. Support requests will most likely not be answered and it's best to use the Support Request Form instead. Thanks!