Track WooCommerce© Products prior prices history and display the lowest price in the last 30 days. This plugin allows your WC shop to be compliant wit …
Track WooCommerce© Products prior prices history and display the lowest price in the last 30 days. This plugin allows your WC shop to be compliant with European Commission Directive 98/6/EC Article 6a which specifies price reduction announcement policy.
The plugin works out of the box: install and activate and your discounted products will be compatible with Omnibus directive!
Plugin is configurable via WooCommerce
> Price History
screen. You can configure:
↪ Where to display the price history information:
» on the single product page
» upsell and related products
» main shop page
» product category pages
» product tag pages
↪ When to display minimal price (always or only when the product is on sale)
↪ How to count minimal price (the minimal from the moment product went on sale to 30 days before that moment or the minimal price from today to 30 days ago)
↪ How many days take into account when calculating minimal price (30 days by default)
↪ How to display the price history information
↪ What to do if the price didn’t change in the last N days (hide price information / display current price / display custom text)
At the configuration screen you will find additional information how to configure the plugin to be compliant with Omnibus directive (European Commission Directive 98/6/EC Article 6a) and link to legal acts.
wp-content/plugins
wp-admin
> Plugins
and activate the pluginYou don’t have to do anything special, the default settings are compliant with Omnibus directive!
However, in case you misconfigured the plugin, here are steps to take to make it compliant again (please note similar suggestions hints you will see on Settings screen):
WooCommerce
> Price History
screenDisplay on
to Single product page
Display minimal price
to Only when product is on sale
Count minimal price from
to Day before product went on sale
Number of days to use when counting minimal price:
to 30 days
Sale price dates from
to the date when the product went on sale.Yes, the plugin is compatible with product taxes and variable products (it tracks minimal price for each variation individually).
If you want to display the lowest products price in other place than default, you can use shortcode wc_price_history
. A few examples:
Display the lowest price on single product page (without passing product ID as argument), currency symbol attached:This product low is [wc_price_history]
Display the lowest price of the other product, currency symbol attached:The product with ID 3 had the lowest price [wc_price_history id=3]
Display without currency symbol:The product with ID 3 had the lowest price [wc_price_history id=3 show_currency=0]
Available filters are:
wc_price_history_is_correct_place (defined in PriorPrice\Prices::is_correct_place
)
Allows to display price history on custom screens, not listed in plugins settings. Return true to make price history visible.
wc_price_history_is_not_correct_when (defined in `PriorPrice\Prices::is_not_correct_when`)
Allows to stop displaying price history for your own custom conditions. Return true to prevent displaying price history.
This is because you have not set Sale price dates from
for these products. Go to the product edit screen and set Sale price dates from
to the date when the product went on sale.
Tip: All the products which are On sale but does not have Sale price dates from
set will be logged to WooCommerce logs. Go to WooCommerce
> Status
> Logs
to see the list of products (in right top corner preselect log which name starts with wc-price-history).
Yes, you can use filter wc_price_history_lowest_price_html_raw_value_taxed
:
`
add_filter( ‘wc_price_history_lowest_price_html_raw_value_taxed’, function( $price, $wc_product ) {
// do something with $price
return $price;
}, 10, 2 );
`
Yes, on the plugin configuration screen click the button ‘Clean history’. This will remove all the history storage for all products. Make sure you know what you are doing (in general, use this option only if you are going to remove plugin completely).
Please submit the GitHub issue.
wc_price_history_is_correct_place
to make it possible to display price history info in custom location.wc_price_history_is_not_correct_when
to stop displaying price history for your own conditions.