| 开发者 | pnscripts |
|---|---|
| 更新时间 | 2026年10月17日 03:44 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
Lowest price in the 30 days before the discount: €21.00It is built around one promise: if the price history cannot prove the number, the plugin shows nothing. No guesses, no "current price" fallbacks. Records every price change
$product->save(). Price fields written directly to the database by other software are picked up at the end of the request.[pnscripts_price_history] or [pnscripts_price_history id="123"].{price}, {days} and {date} placeholders, or the translated default.wp pnscripts-price-history reference|history|backfill|import|prune.pnscripts-price-history folder to /wp-content/plugins/ or install the plugin from the Plugins screen, then activate it.No plugin can promise that. It records prices and shows the lowest prior price according to the rules you configure; you remain responsible for your prices, your promotions and how you announce them. This FAQ is not legal advice.
Because the history cannot prove the number yet: the product was already on sale when recording started, it was launched recently and your rules hide the notice for new products, or prices were changed while the plugin was inactive. The Coverage report shows the reason for every product.
Not if you know the earlier prices. Import them from another lowest-price plugin, or add them from your own records (product screen, CSV upload under WooCommerce → Price History → Import and tools, or wp pnscripts-price-history import-records file.csv): one line for the regular price from a day at least 30 days before the discount, one line for the day the discount started. You are responsible for these prices, so keep the records they come from.
No. Prices are stored in one table of the plugin's own, one row only when a price really changes (not on every save or page view), and rows older than the retention period (90 days by default) are deleted automatically, except those a running discount still needs. Nothing is written to posts or post meta. For scale: 50,000 price changes take about 10 MB (MySQL 8.0).
Yes, when they save through WooCommerce (product editor, quick and bulk edit, CSV import, REST API, WP-CLI, spreadsheet-style editors that call WooCommerce). Prices written straight into the database by other software are detected at the end of the request, and the "Check the catalogue" tool finds changes that bypassed WordPress entirely; such gaps make the notice disappear instead of showing a wrong number.
The product's own regular and sale prices as saved in WooCommerce. Prices that a plugin calculates on the fly for a customer group are not part of the history; if your shop shows such a price as a discount, the notice is hidden for it ("a discount that is not in the recorded prices").
If you lower a sale price again without ending the sale, the period still ends when the first reduction started, so the notice keeps the price from before the first reduction.
Yes. Every price that was in force during the period counts, including an earlier sale.
The same way as your shop: it follows WooCommerce's "Display prices in the shop" setting. Prices are stored as entered, so after a change of the tax rates (when prices are entered without tax or shown without tax), of "Prices entered with tax" or of "Enable taxes", and after a change of the shop currency, the notice is hidden until the whole period lies after the change.
Yes. Each variation has its own history and its own prior price. The notice appears when a shopper selects a variation. Price ranges of the parent product carry no notice.
No. The free plugin adds the notice only.
Use the shortcode [pnscripts_price_history] on a product page or [pnscripts_price_history id="123"] anywhere, and switch off the automatic notice on product pages if you want only the shortcode.
Prices are written only when they change, reads use an indexed table and results are cached. The catalogue is processed in the background with Action Scheduler.
Nothing, unless you tick "Delete the price history and settings when the plugin is deleted" in the settings. Keeping the history is the safer default.
Omnibus — show the lowest price (iWorks), WC Price History for Omnibus, and Omnibus by iLabs. The import only reads their data.
pnscripts-price-history) after the WordPress.org review. Settings move to WooCommerce → Price History, the WP-CLI command is wp pnscripts-price-history, the shortcode is [pnscripts_price_history] (the 1.0.0 tag [pnscripts_omnibus_price] still works), and the plugin's address is https://pnscripts.com/marketplace/pnscripts-price-history. Settings and price history are kept.