Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.14 KB

File metadata and controls

30 lines (21 loc) · 1.14 KB

Omnibus — WooCommerce EU Price Directive Plugin

WooCommerce plugin implementing the EU Omnibus Directive (2019/2161), which requires displaying the lowest product price from the 30 days prior to a sale.

Features

  • Tracks regular price history for simple products and variations
  • Displays lowest pre-sale price on product pages and in loops
  • Falls back to current regular price for products on sale before plugin activation
  • Handles scheduled sales — captures price at sale start, cleans up at sale end
  • Compatible with multi-currency plugins: WCML, Curcy
  • Triggers LiteSpeed Cache purge on sale start/end

How it works

The plugin maintains a custom database table (chocante_omnibus_price_log) that logs regular price changes per product over time. When a sale starts, the lowest recorded price from before the sale date is stored as post meta and appended to the product price HTML on the front-end. Logs older than 30 days are purged daily via WP-Cron.

Database

Creates a single table on activation:

chocante_omnibus_price_log (id, product_id, price, date_changed)

Dropped cleanly on uninstall along with all related post meta.