=== PriceProof – Omnibus Lowest Price in 30 Days for WooCommerce ===
Contributors: jordennabbe
Tags: woocommerce, omnibus, price history, lowest price, sale
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show the lowest price of the last 30 days on every WooCommerce sale (EU Omnibus rule), backed by a price history you can prove.

== Description ==

**Every discount in an EU shop must show the lowest price of the previous 30 days. WooCommerce does not do this by itself.**

Since 28 May 2022 the EU Omnibus directive (Directive 2019/2161, article 6a of Directive 98/6/EC) requires every price reduction announcement to state the lowest price the product had in the 30 days before the reduction. Consumer authorities in Germany, Poland, France, the Netherlands and other member states enforce it. A "was €100, now €80" without that line is a violation.

PriceProof records every price change of every product and variation, calculates the correct reference price for each sale and shows it under the price, on product pages, in shop lists and for the selected variation. When the history cannot back a figure up, PriceProof shows nothing instead of a wrong number.

See it in two minutes:

https://www.youtube.com/watch?v=1pa8rCsBW5k

**How it works**

1. Activate the plugin. From that moment every price change is recorded, whichever route it takes: the product editor, quick and bulk edit, the REST API, CSV imports, scheduled sales or plugins that write prices directly.
2. Import prices from your past orders under WooCommerce → PriceProof → Tools. Every paid order proves what a customer paid on that day, so the 30-day window is covered right away for products you have sold.
3. Put a product on sale as usual. PriceProof adds "Lowest price in the last 30 days: €…" in the language of your site (built-in wording for 15 languages, or your own text).

**What makes PriceProof different**

* **Never a figure you cannot prove.** Competing plugins guess when their history is too short. PriceProof knows exactly which period its records cover and hides the line when the window is not covered, so you are never caught showing a wrong reference price.
* **Correct rule, not just a minimum.** The reference is the lowest price in the 30 days *before* the reduction started. When you lower a running sale further, the reference from before the first reduction is kept, as the directive allows. A rolling "last 30 days" mode is available for shops that prefer it.
* **Tamper-evident history.** Every record is chained to the previous one with a SHA-256 hash and stores who changed the price and through which route. Retention is configurable (24 months by default); the latest price of every product is always kept.
* **One record per change, not per page view.** Small table, fast pages, even with thousands of products.
* **Variations done right.** Each variation is tracked separately and the line follows the variation the customer selects.
* **Block themes and classic themes.** Works with the Product Price block, classic templates, shop loops, related products, a shortcode and a template function.
* **Switch without losing history.** Imports the data left behind by Omnibus (iworks) and WC Price History.

**Included in this free plugin**

* Price history per product and variation with source and user.
* Lowest price in the 30 days before the reduction (or a longer period of your choice).
* Progressive-discount handling and a rolling-window mode.
* Display on product pages, in shop and category lists and for selected variations; shortcode `[priceproof_lowest]`; template function `priceproof_lowest_price_html()`.
* Built-in wording for Dutch, German, French, Polish, Italian, Spanish, Portuguese, Swedish, Danish, Finnish, Czech, Romanian, Hungarian, Greek and English; custom wording with `{price}` and `{days}`.
* Import from past orders; import from Omnibus (iworks) and WC Price History.
* Overview of all sale products with their reference price and status.
* Price history tab on every product, with a documented manual reference price for special cases.
* Daily check that catches price changes made outside WordPress hooks.
* Configurable retention, optional deletion on uninstall.

**PriceProof Pro** adds a campaign planner (which reference price may you show on the start date, is the planned price a real reduction, and will Google Shopping display the sale label), a fake-discount guard that shows non-reductions as plain prices, a verified audit export and printable report, and a daily alert e-mail. Pro is sold separately by the plugin author; the free plugin is complete on its own.

**Good to know**

PriceProof is a tool that helps you apply the price-reduction rules; it is not legal advice. Rules on progressive discounts, perishable goods and products newer than 30 days differ per member state. Check the guidance of your national consumer authority.

== Installation ==

1. Install and activate WooCommerce 9.0 or newer.
2. Upload the plugin or install it from the WordPress.org directory, then activate it.
3. Go to WooCommerce → PriceProof → Tools and import prices from your past orders.
4. Check WooCommerce → PriceProof → Settings for the wording and display locations. That is all; sale products now show the reference price.

== Frequently Asked Questions ==

= I just installed the plugin and my sale products show nothing. Why? =

PriceProof only shows a reference price when its history covers the 30 days before the reduction started. Import your past orders under Tools; every paid order records the price of that day. Products newer than 30 days show the lowest price since launch automatically. For special cases you can set a documented manual reference on the product.

= Does it change my prices or my sale badges? =

No. The free plugin only adds a text line under the price. It never changes prices, sale status or badges.

= Which price is the reference exactly? =

The lowest price in effect at any moment during the 30 days before the current reduction started, per variation, in your shop currency, displayed with or without tax according to your WooCommerce settings. Prices from a running sale that you lower further do not become the new reference.

= Does it work with block themes? =

Yes. The line is added through WooCommerce's price output, which the Product Price block and classic templates both use. If your theme builds prices in an unusual way, use the shortcode `[priceproof_lowest id="123"]` or the template function.

= Does it slow down my shop? =

No. A record is written only when a price actually changes, and the reference price for a page is one indexed query per sale product.

= Can I export the history? =

The free plugin shows the history per product. CSV export, a printable report and chain verification are part of PriceProof Pro.

= Is it GDPR-relevant? =

The plugin stores product prices and the ID of the logged-in user who changed a price. It does not store customer data and makes no external requests.

== Screenshots ==

1. The lowest price of the last 30 days under a sale price on the product page.
2. Overview of all sale products with reference price and status.
3. Price history tab on the product with every change, its source and the user.
4. Tools: import from past orders and from other plugins.
5. Settings with built-in wording per language.

== Changelog ==

= 1.0.0 =
* First release: price history, Omnibus reference price, display for products and variations, imports from orders and other plugins, overview and product tab.
