Skip to content

Omnibus Directive - price tracking

The Omnibus Directive (EU 2019/2161) has been in effect in Poland since January 1, 2023. With every price reduction you must show the lowest price from the last 30 days. The plugin automatically tracks price history and displays this information with promotions.

The plugin records every product price change (including variations) in the database. When a product is “on sale”, the plugin calculates the lowest price from 30 days and shows it to customers.

Tracking starts after enabling the module. If a product has no price history yet, a placeholder message displays.

Product page with Omnibus lowest price displayed

Go to WooCommerce > Settings > Polski > Omnibus and configure the available options.

OptionDescriptionDefault value
daysNumber of days back for calculating the lowest price30
prune_after_daysAfter how many days to delete old history entries90

prune_after_days controls the size of the database table. A value of 90 means data older than 90 days is automatically deleted.

OptionDescriptionDefault value
include_taxWhether the displayed Omnibus price should include VATtrue

Set according to your WooCommerce price settings. If store prices are gross, leave true.

OptionDescriptionDefault value
display_on_sale_onlyDisplay only for products on saletrue
show_on_singleSingle product pagetrue
show_on_loopProduct list (category, shop)false
show_on_relatedRelated productsfalse
show_on_cartCartfalse

Enable at least on the product page (show_on_single). On the product list (show_on_loop) it takes more space, but some interpretations of the regulations require it.

OptionDescriptionDefault value
show_regular_priceAlso display the regular price alongside the Omnibus pricefalse
OptionDescriptionDefault value
display_textTemplate for the displayed messageLowest price from {days} days before the discount: {price}
no_history_textText when there is no price historyNo previous price data available

Available variables in the display_text template:

  • {price} - lowest price from the given period
  • {days} - number of days (default 30)
  • {date} - date of the lowest price
  • {regular_price} - regular product price (before promotion)
Lowest price from {days} days before the discount: {price}
Lowest price from the last {days} days: {price} (regular price: {regular_price})
Omnibus: {price} (from {date})
OptionDescriptionDefault value
price_count_fromWhen to start counting 30 dayssale_start

Available values:

  • sale_start - from the sale start date (recommended by UOKiK)
  • current_date - from the current date
OptionDescriptionDefault value
variable_trackingVariant tracking methodper_variation

Available values:

  • per_variation - separate tracking for each variant (recommended)
  • parent_only - tracking only the parent product price

per_variation gives more accurate data, because each variant can have a different price and discount history.

Use the shortcode [polski_omnibus_price] to display the lowest price information anywhere on the site.

[polski_omnibus_price]

Displays the Omnibus price for the current product.

[polski_omnibus_price product_id="456" days="30"]
ParameterDescriptionDefault value
product_idProduct IDCurrent product
daysNumber of daysValue from settings
echo do_shortcode('[polski_omnibus_price product_id="' . $product_id . '"]');

WP-Cron removes price history entries older than prune_after_days daily. The database table does not grow without limits.

To manually force cleanup, you can use WP-CLI:

Okno terminala
wp cron event run polski_omnibus_prune

UOKiK guidelines:

  1. The lowest price information must be displayed with every discount announcement
  2. The reference period is 30 days before applying the discount
  3. For products sold for less than 30 days - provide the lowest price since the date of introduction to sale
  4. For perishable products - the period may be shortened

The plugin follows these guidelines by default. The price_count_from option set to sale_start counts from the sale start date, as recommended by UOKiK.

Omnibus price does not display Check that the product has a sale price set in WooCommerce. With display_on_sale_only enabled, the message appears only during an active promotion.

A no-history message displays Price tracking starts after enabling the module. Wait for a price change or save the product again to add the first history entry.

Omnibus price is the same as the sale price This is correct behavior if the product has not had a lower price in the last 30 days.

This page is for informational purposes only and does not constitute legal advice. Consult a lawyer before implementation. Polski for WooCommerce is open source software (GPLv2) provided without warranty.