Cost & Margin Pricing for WooCommerce

The price change log, margin health and Omnibus

2 Views Last updated: 2026-08-13

The log sees everything

The plugin's journal has always recorded its own writes. On top of that, price and cost changes made outside the plugin are now logged too: in the product editor, by other plugins, via the REST API, or when a scheduled sale kicks in. Every entry carries the time, source, old and new value and who made the change — visible under "Recent changes" on the product's Cost & Margin tab. Drift detection can therefore show when and by whom a price changed, not just that it deviates.

Margin health

The "Margin health" card on the dashboard only appears when something is wrong: products whose net price (the product's real tax class is respected) sits below the real cost in COGS, and active sales priced below cost. Sorted by loss per unit — worst first. The check re-runs automatically after every applied run and can be re-run manually with the card's button.

Lowest price 30 days (Omnibus)

From the log, the lowest price of the last 30 days is computed per product — the reference value the EU Omnibus directive requires when marketing price cuts. It is shown in the "Why this price?" view, and can optionally be shown to customers with the [pihlcmp_lowest_price] shortcode (respecting your store's tax display setting). The plugin never adds anything to your storefront on its own. Note: history starts at plugin activation — earlier changes cannot be known.

Using the shortcode

Place [pihlcmp_lowest_price] where the line should appear: in the product description, a block, or your theme's product template via echo do_shortcode( '[pihlcmp_lowest_price]' );. The output is a discreet line — "Lowest price last 30 days: 199 kr" — rendered as a <small> element so it blends into any theme without styling.

  • label="Your text:" changes the label, label="" shows the bare price.
  • id="123" shows the value for a specific product outside product context.
  • The CSS classes pihlcmp-lowest-price, pihlcmp-lowest-price-label and pihlcmp-lowest-price-value sit on every part, so you can style freely — the plugin ships no CSS of its own.

The price respects your store's tax display setting, so the figure matches the prices next to it. If a product has no history yet, nothing at all is rendered — never an empty label.

The foundation for price analysis

The log and WooCommerce's cost snapshot on order lines are the data foundation for upcoming price-analysis features (price change impact, elasticity, recommendations). Data collection is already running from installation — the earlier the plugin is installed, the more history exists when the analytics ship.

Need help?

Still need help?

Couldn't find what you're looking for? We're happy to help.

Contact Us