Prawo w e-commerce

Lowest Price in 30 Days in WooCommerce: Calculation Examples

ยท Krzysztof Balicki

Jeans with a price and size tag on a white table

The lowest price in 30 days is the price you show next to a sale price: the lowest price that applied in the 30 days before the day the discount was introduced. You count the window back from the day of the discount, not from today, and you do not include the sale price itself. WooCommerce does not store price history, so without an extra tool your store has nowhere to take this value from. Below you will find four worked examples with specific dates, common mistakes and a way to make your store calculate it on its own.

What does the law say about the lowest price before a discount?

The rules are in Article 4 of the Polish Act on informing about prices of goods and services (consolidated text in the Journal of Laws), which implements the Omnibus Directive. The provision has four parts that matter for an online store:

  • whenever you announce a price reduction, you show the lowest price from the 30 days before it was introduced (para. 2),
  • if a product has been on sale for less than 30 days, you count from the day sales started to the day of the discount (para. 3),
  • for goods that perish quickly or have a short shelf life, you show the price from before the discount was first applied (para. 4),
  • the same rules apply accordingly to advertising a product with its price (para. 5).

For the wider background, meaning who the obligation applies to and what changed in 2023, see our post on the Omnibus Directive in online stores. Here we focus on the calculation. This is not legal advice.

Lowest price in 30 days: four worked examples

Take a WooCommerce board game store that is preparing a sale for 1 November. The prices and dates are assumptions for this example.

Example 1: a regular discount

A game cost PLN 149 until 15 October, PLN 139 from 16 October, and on 1 November it drops to PLN 119. The window is the 30 days before 1 November. The lowest price in 30 days is PLN 139 here, and that value must appear next to PLN 119. The PLN 149 price also falls within the window, but it is higher.

Example 2: a new product on sale for less than 30 days

A new game arrived in the store on 20 October at PLN 159, and on 25 October its price dropped to PLN 149. For a discount to PLN 129 on 1 November, you count the period from 20 October to the day of the discount. The lowest price is PLN 149.

Example 3: a second discount during a sale

The game from example 1 costs PLN 119 from 1 November, and on 15 November the store cuts it to PLN 99. In the 30 days before 15 November the price was already PLN 119, so next to PLN 99 you show PLN 119, not PLN 139. The directive allows member states to adopt a rule that for a progressively increasing discount the reference point is the price from before the first reduction, as you can see in the text of Directive 2019/2161. The Polish act does not repeat that rule. If your campaign has several discount steps, it is worth checking with a lawyer.

Example 4: a product with a short shelf life

If the store also sold sweets with a short shelf life, it would show the price from before the discount was first applied. The 30-day window does not apply here.

SituationPeriod to checkWhat you show
Regular discount30 days before the discountthe lowest price in that period
New productfrom the start of sales to the discountthe lowest price in that period
Further discount30 days before the new discountthe lowest price, including sale prices
Short shelf lifeno windowthe price before the first discount

The table summarises Article 4 of the act linked above and the examples in this post.

The most common calculation mistakes in WooCommerce

Most mistakes come from the fact that WooCommerce only keeps the regular price and the sale price, with no dates. Watch out especially for four situations:

  1. The window counted from today. The notice shows the lowest price from the last 30 days, which already includes the sale price. Both numbers are then the same and the information tells the customer nothing.
  2. A price increase just before a sale. The lower price from before the increase stays in the window and becomes the reference point.
  3. Scheduled sales. WooCommerce can switch on the sale price by itself on the scheduled day. Check whether your price history tool records that change, and not only a manual product save.
  4. Variations. Each variation has its own price and its own history. Read more in the guide on showing product price history.

Lowest price in 30 days in WooCommerce: how to show it automatically?

You need a record of prices with dates and a notice on the product page when a product is on sale. From version 1.1, the free WS Price History plugin saves every change of the regular and sale price with its date in a separate table, and for a product on sale it shows the lowest price from the 30 days before the discount was introduced. It supports variable products, sales switched on by the WooCommerce schedule and perishable goods, and when uninstalled it removes its data from the database.

  1. In the WordPress dashboard go to Plugins, Add New, type „WS Price History” in the search field, click Install Now and then Activate.
  2. In the „WS Price History Settings” menu, in the „Main” section, click the button that indexes prices.
  3. For perishable goods, tick this option when editing the product, so the store shows the price from before the first discount.
  4. Recreate example 1 on a test product and compare the notice with your manual calculation.

The history starts on the day of indexing, because the plugin does not know prices from before it was installed. That is why you should run it at least 30 days before your first campaign. Before Black Friday, add the rest of the list for preparing a WooCommerce store for Black Friday.

Before your next sale, pick three products, write down their prices from the last 30 days and check whether the store shows the same lowest price in 30 days as your calculation. If WooCommerce does not have price history yet, start with the free WS Price History plugin and give it a month to collect data.

Frequently asked questions

Do I have to show the lowest price for products that are not on sale?

No. The obligation applies when you announce a price reduction. A product at its regular price does not need this information.

Does the rule cover newsletters and ads?

Yes, the act requires these rules to be applied accordingly to advertising a product with its price. If you give a reduced price in an email, also give the lowest price from before the discount.

Does raising the price before a sale change the reference point?

Not in the store’s favour. What counts is the lowest price from the whole 30-day window, so the lower price from before the increase will still be the value you have to show.