Lowest price in the last 30 days on WooCommerce
Every advertised discount must show the lowest price from the thirty days before it. WooCommerce keeps no such history, so something has to keep it instead.
What has to be shown
When a discount is advertised, the lowest price the item was sold for in the 30 days before that discount must appear next to the new price. The rule comes from EU Omnibus Directive 2019/2161 and is transposed into Croatian consumer law.
The number is not the regular price and not the all-time low. It is the lowest price in the thirty-day window preceding the discount.
Why WooCommerce cannot do it alone
WooCommerce stores current state, not history. A product has _regular_price and _sale_price, and when you change them the previous value is simply gone.
So a plugin that hands you a finished number on day one is either reading _regular_price, which in ERP-fed stores is the manufacturer's MSRP, or writing today's price as if it had also been yesterday's.
How this plugin computes it
Once a day, at an hour you choose, it walks the catalogue and records the price the buyer actually sees: the result of wc_get_price_to_display(), including tax and after every filter other pricing plugins apply.
- Within one day the lowest price seen is kept, so a discount that started at ten in the morning does not erase the higher price that stood before it.
- The window is rolling: every recorded day no older than thirty days, and the minimum among them.
- Below two distinct recorded days nothing is claimed.
- History is kept for a hundred days, so widening the window leaves no gap.
- Variations are computed individually; a variable parent takes the lowest among its variations, and only when every one of them has a value.
What shows while there is no history
Nothing. A blank next to the price does less damage than a number you cannot back up.
Instead, the admin lists products advertised with a discount but without cover, and the same count appears as a dashboard warning.
Importing history from an ERP
History cannot be invented, but it very often already exists somewhere. Import takes one row per product and day, and days the plugin recorded itself are never overwritten.
The whole recorded history exports back to CSV in one click, as the document you hand over when proof is requested.
SKU;YYYY-MM-DD;PRICE
0100071;2026-09-10;25.00
0100071;2026-09-11;24.50Where it prints in the store
On classic themes it inserts itself under the price. For block and custom themes there are three outputs that work anywhere.
The wording is a setting, and the klikoteka_cijene_redovi filter gives the theme the final say.
[klikoteka_cijene]
<?php do_action( 'klikoteka_cijene', $product ); ?>
<?php echo klikoteka_cijene_html( $product ); ?>Frequently asked
Can the lowest price be computed thirty days back, starting today?
No. WooCommerce keeps no history of displayed prices. The only honest way is to import it from a system that did keep it.
Is the price recorded with or without tax?
What the buyer sees on the product page, following your store's tax display settings.
What if I change prices several times a day?
One value per day is stored, and it is the lowest the plugin saw. Snapshots can also be triggered manually.
Does the daily snapshot slow the store down?
Processing runs in batches with a cursor, so a catalogue of several thousand items is handled in short passes rather than one long one.
Does it work with WPML?
Yes. History is tied to the product id, so each translation carries its own.
Also in the same plugin
Anchor price for a reference day
The price on a day you choose, shown next to the regular price for as long as you decide.
Machine-readable price list
A daily export of the whole catalogue to CSV, XML and JSON at a permanent address.
Sidrena cijena i cjenik za WooCommerce
All three features, a one-off €20 + VAT.
