=== Product Price History for WooCommerce ===
Contributors: devnethr, MarinMatosevic
Tags: price history, product price, chart, lowest price, graph
Requires PHP: 7.4
Requires at least: 6.4
Stable tag: 2.6.3
Tested up to: 7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Track product price history with customizable charts and graphs on your WooCommerce store. Show lowest price and increase customer trust.

== Description ==

Product Price History for WooCommerce tracks and records product price changes over time.

The plugin allows you to display a price history chart on the product page and show the lowest price recorded within the last 30 days when a product is on sale.

In the European Union, displaying the lowest price from the previous 30 days is required for discounted products (Omnibus Directive). This plugin helps store owners present that information in a clear and structured way.

Price history data is stored automatically and can be displayed using built-in placement options or a shortcode, depending on configuration.


### [DOCUMENTATION](https://devnet.hr/docs/product-price-history/) | [PRODUCT PRICE HISTORY PRO](https://devnet.hr/plugins/product-price-history/)


## Who is plugin for?

* eCommerce Store Owners: Simplify and enhance your pricing strategy while gaining the trust of your customers.
* Agencies building shops for clients: Offer added value to your clients by incorporating transparent pricing history features into their webshops.
* Anyone striving to create a better user experience: Empower customers to make informed decisions and build trust through transparency.
* Anyone aiming to increase shop performance: Optimize your pricing strategy, boost profits, and stay competitive with detailed price history insights.
* Anyone seeking to add more dynamism to the shop: Make your webshop visually appealing and engaging with customizable price history charts.

### Features

* **Track product price history:** Keep a record of price changes over time for every product in your WooCommerce shop.
* **Chart module:** Visualize the price history using an intuitive bar chart for easy analysis.
* **Customizable chart:** Customize the appearance and styling of the price history chart to match your website's design.
* **Lowest Price module:** Display the lowest price recorded within the last 30 days for each product.
* **Customizable lowest price message:** Personalize the message.
* **Option to hide certain prices:** Choose to hide specific prices from the price history chart and/or the lowest price display.

### Ready to unlock even more features? 

Check out [PRODUCT PRICE HISTORY PRO](https://devnet.hr/plugins/product-price-history/)!

#### Chart Features PRO
* **Line Chart:** Enjoy the additional feature of displaying price history as a line chart.
* **Stepped Chart:** Leverage the stepped chart option to present the price history in a step-by-step manner.
* **Toggle Chart Ranges:** Empower users to toggle between different time ranges on the price history chart.
* **Chart Shortcode:** Utilize a shortcode to embed the price history chart anywhere on your product page.
* **Chart Shortcode with ID:** Display multiple charts on the same page anywhere on the site.
* **Chart Summary Options:** Show lowest, highest, and average price summaries.
* **Exclude Prices:** Exclude prices below or above certain thresholds from the chart.
* **Daily Average:** Show the average price per day.
* **Description Text:** Set a description text above the chart.


#### General Features PRO
* **Currency Switcher Plugins Compatibility:**
  * FOX (former name is WOOCS)
  * CURCY - Multi Currency for WooCommerce
  * WooCommerce Multilingual by OnTheGoSystems (WPML)
* **Record Prices in Multiple Currencies:** Compatible with WooCommerce Multilingual.
* **Edit or Delete Recorded Prices:** Set custom dates, currencies, and more.
* **Lowest Price:** Set custom lowest price.


With [Product Price History PRO](https://devnet.hr/plugins/product-price-history/), you not only get access to all the advanced features but also enjoy premium support to ensure a seamless experience.


### Support

We're here to help. Feel free to open a new thread on the [Support Forum](https://wordpress.org/support/plugin/product-price-history/).

### Documentation

You can check out the [Product Price History documentation](https://devnet.hr/docs/product-price-history/) for more information.


### Reviews

It's funny how much joy all those 5-star reviews bring to our team. It really keeps us going and motivates us to bring more cool features.
If you like this plugin, feel free to leave a [review](https://wordpress.org/support/plugin/product-price-history/reviews/#new-post).

## Other Plugins by Devnet

Here are some other plugins we have developed that you might find useful:

- [Free Shipping Label](https://wordpress.org/plugins/free-shipping-label/) - Increase order revenue by showing your customers just how close they are to your free shipping threshold.
- [Product Price History](https://wordpress.org/plugins/product-price-history/) - Track product price history with customizable charts and graphs on your WooCommerce store. Show lowest price and increase customer trust.
- [Price Alerts](https://wordpress.org/plugins/price-alerts/) - Let customers subscribe to price drops and boost sales by notifying interested buyers when product prices fall below their target.
- [Easy Subscribe](https://wordpress.org/plugins/easy-subscribe/) - Effortlessly integrate customizable subscription forms on your WordPress site with a simple shortcode.
- [Easy Booking Calendar](https://wordpress.org/plugins/easy-booking-calendar/) - Turn any product into a reservation-ready item. This plugin adds a customizable calendar to product pages, allowing customers to select date ranges for bookings.
- [BizNotes](https://wordpress.org/plugins/biznotes/) - Exclusive admin notes for seamless order management among multiple admins. Effortless collaboration, powered up.
- [PingVid](https://wordpress.org/plugins/pingvid/) - A lightweight WordPress plugin that adds a floating video widget to your site.
- [Snap Blocks](https://wordpress.org/plugins/snap-blocks/) - A lightweight plugin that lets you create reusable content blocks in WordPress.

== Installation ==

= Installation from within WordPress =

1. Visit **Plugins > Add New**.
2. Search for **Product Price History**.
3. Install and activate the Product Price History plugin.

= Manual installation =

1. Upload the entire `product-price-history` folder to the `/wp-content/plugins/` directory.
2. Visit **Plugins**.
3. Activate the Product Price History plugin.

= After activation =

Visit the new **Price History > Settings** menu.
Enable the individual modules you would like to use.

== Frequently Asked Questions ==

= The price history chart is not displaying on my product pages, what should I do? =

First, enable the chart module, navigate to the "Price History > Chart Settings" section and ensure that the "Enable" option is checked. The "Minimum prices to display" field determines the minimum number of price changes required for the chart to be displayed.

It's important to note that the product price history only tracks price changes from the point at which the plugin was activated. It does not track any previous price changes that may have occurred before activation.

Ensure that the chart is not hidden on your product page, navigate to the "Product Price History" tab on the edit product page and make sure that the "Hide chart" checkbox is not checked.

If the chart still does not display, try clearing your browser cache or accessing the page from a different browser. If the issue persists, contact our support team for further assistance.

= What data does the plugin track? =

The plugin tracks the price of each product over time, including any sale prices or discounts.

= Can I customize the price history chart? =

Yes, the plugin provides a customizable chart with options to adjust the color scheme, minimum number of prices to show, and date range to display.

= Can I hide the chart on certain products only? =

Yes, you can do so by going to the edit product page, navigating to the "Product Price History" tab, and checking the "Hide chart" checkbox.

= Can I hide certain prices from the chart and/or lowest price display? =

Yes, you can do so by going to the edit product page. For simple products, navigate to the "Product Price History" tab and select the prices you would like to exclude.

For variable products, there are two sets of charts. The first chart displays prices before any variation is selected and can be found in the "Product Price History" tab on the edit product page. The second chart tracks prices for each variation and can be accessed by clicking on the variation and scrolling down to the bottom.

= Is displaying the lowest price mandatory? =

If you're operating in the European Union, displaying the lowest price of a product on sale within the last 30 days is mandatory. However, even if you're not required to do so, it's a best practice to show customers previous sale prices of a product.

= How does the plugin help me optimize my pricing strategy? =

By tracking your price history and displaying it in a chart, the plugin helps you to see which prices are most effective and make data-driven decisions about your pricing strategy.

= Will my customers appreciate the transparency provided by the plugin? =

Yes, customers value transparency and credibility, and displaying your price history can help you build trust and loyalty with them.


== Screenshots ==

1. Single product page
2. Edit product

== Changelog ==

= 2.6.3 =

*2026-04-22*

* Fix: Incorrect placeholder %1$s in "No price changes" message (placeholder not rendering properly)
* Update: Updated Freemius SDK to the latest version
* Tweak: Refined admin CSS for better integration with WordPress 7.0
* Compatibility: WordPress tested up to 7.0
* Compatibility: WooCommerce tested up to 10.7


= 2.6.2 =

*2026-02-24*

* Fix: i18n improvements (ordered placeholders, translators comments)
* Fix: Timezone-safe date handling
* Fix: Escaping improvements in admin
* Update: Readme cleanup for WordPress.org compliance
* Dev: Added composer.json

= 2.6.1 =

*2026-02-18*

* Fix: Prevented edge case error when product is not on sale and lowest price display is enabled for regular prices
* Fix: Corrected 30-day lowest price display when product is not on sale
* Add: Additional chart position options
* Dev: Added `pph_lowest_price_wrapper_tag` filter hook
* Compatibility: WooCommerce tested up to 10.5

= 2.6.0 =

*2025-12-01*

* Fix: Resolved edge-case chart error when no ranges are available
* Add: Support for recording price changes triggered via REST API
* Add: Lowest Price module – option to swap regular price with the lowest price from the last 30 days
* Update: Lowest Price module – improved settings UI and clearer option controls
* Performance: Optimized price-recording engine with better handling of variable product changes
* Performance: General codebase cleanup and optimizations
* Tweak: Improved compatibility with multi-currency setups
* Tweak: Refined frontend CSS for better theme integration
* Tweak: Enhanced error handling and fallback behavior
* Deprecated: Removed built-in Price Alerts module

= 2.5.7 =

*2025-11-20*

* Fix: Charts now display price values using the decimal precision defined in WooCommerce settings
* Fix: Corrected price-change detection to follow WooCommerce decimal settings for accurate comparisons
* Fix: Chart background color applied only on the chart, not on the whole widget area
* Add: No data text over the chart if there is no entries for the selected period
* Update: Chart module
* Update: Updated Freemius SDK to the latest version
* Compatibility: WP tested up to 6.9
* Compatibility: WC tested up to 10.3

= 2.5.6 =

*2025-10-02*

* Fix: Ensure database tables are created properly on plugin activation
* Update: Chart module
* Update: Updated Freemius SDK to the latest version
* Performance: Plugin code optimization
* Compatibility: WC tested up to 10.2

= 2.5.5 =

*2025-06-24*

* Add: Security and housekeeping improvements across plugin files and directories
* Update: Settings API for better structure and extensibility
* Update: Plugin settings layout and logic
* Update: Color picker script for improved compatibility
* Update: Updated Freemius SDK to the latest version
* Compatibility: WP tested up to 6.8
* Compatibility: WC tested up to 9.9


= 2.5.4 =

*2025-01-27*

* Update: Updated Freemius SDK to the latest version
* Compatibility: WC tested up to 9.6

= 2.5.3 =

*2025-01-07*

* Dev: Module check constants
* Compatibility: WC tested up to 9.5

*2024-11-15*

= 2.5.2 =

*2024-11-15*

* Update: Freemius WordPress SDK
* Compatibility: WP tested up to 6.7
* Compatibility: WC tested up to 9.4

= 2.5.1 =

*2024-09-09*

* Fix: Line chart line color issue
* Fix: Chart not displaying when "Show chart on variable products only when variation is selected" is enabled
* Fix: Typo in Chart and Price Alerts settings options

= 2.5.0 =

*2024-08-30*

* Add: Filter hook `pph_add_today_as_last_data_point` - default false
* Update: Date format in the price history table view
* Update: Price Alerts Grid
* Update: Chart
* Update: Freemius WordPress SDK
* Update: Language file
* Performance: Preload variations data in the chart
* Compatibility: WP tested up to 6.6
* Compatibility: WC tested up to 9.2

= 2.4.4 =

*2024-05-24*

* Fix: Lowest price in the last 30 days
* Add: compatibility with WooCommerce Multilingual by OnTheGoSystems
* Update: Freemius WordPress SDK
* Compatibility: WC tested up to 8.9

= 2.4.3 =

*2024-04-09*

* Add: Chart - width unit selector
* Update: Freemius WordPress SDK

= 2.4.2 =

*2024-03-21*

* Fix: Chart displays only on the initial variation change, subsequent variations fail to render it
* Add: Delete Price Alert subscribers
* Compatibility: WP tested up to 6.5
* Compatibility: WC tested up to 8.7

= 2.4.1 = 

*2024-01-12*

* Fix: Lowest Price - double tax on variable products with fewer than two entries when “Inherit from regular price” option enabled.
* Fix: Chart - Show chart on variable products only when variation is selected.

= 2.4.0 =

*2024-01-17*

* Fix: Lowest price currency conversion
* Add: Chart module - product tab option
* Add: Chart module - description text
* Add: Check for missing DB tables and repair tool
* Add: Price Alerts module - Double Opt-In option 
* Enhancement - Delete data upon uninstall only if one PPH plugin
* Enhancement - Price Alerts module - email headers
* Update: Freemius WordPress SDK
* Compatibility: WC tested up to 8.5

= 2.3.1 =

*2023-12-05*

* Fix:  Uncaught TypeError from min_prices_to_display check

= 2.3.0 =

*2023-12-04*

* Fix: displaying the lowest price on sale for more than 30 days
* Add: lowest price module - show regular price option
* Add: delete product price history
* Dev: filter hook `pph_price_html_before_lowest_price_html`
* Dev: filter hook `pph_price_html_before_lowest_price_html`
* Dev: filter hook `pph_lowest_price`
* Update: Freemius WordPress SDK
* Compatibility: WP tested up to 6.4
* Compatibility: WC tested up to 8.3


= 2.2.0 =

*2023-08-17*

* Fix: JS error when missing chart wrapper div
* Add: Chart module - Exclude prices above
* Add: Chart module - Exclude prices below
* Update: language .pot file
* Compatibility: WP tested up to 6.3
* Compatibility: WC tested up to 8.0

= 2.1.6 =

*2023-07-14*

* Fix: broken select2 dropdown in admin settings

= 2.1.5 =

*2023-07-05*

* Update: Freemius SDK 2.5.10

= 2.1.4 =

*2023-06-16*

* Fix: Chart - daily average - prices above 1000
* Fix: Chart - output empty chart if not enough variation price history

= 2.1.3 =

*2023-06-16*

* Fix: Admin - select2 is not a function
* Add: Delete old price history option
* Add: PRO - option to show daily average prices in the Chart
* Add: PRO - Record price changes - frequency at which price changes are recorded in the database
* Update: Chart Y scale starting from 0 and expanding 20% above the highest price value
* Update: language .pot file
* Update: Freemius WordPress SDK
* Performance: code optimization
* Compatibility: WC tested up to 7.8

= 2.1.2 =

*2023-06-10*

* Fix: chart range selector

= 2.1.1 =

*2023-06-08*

* Fix: chart javascript syntax error

= 2.0.1 =

*2023-06-07*

* Fix: premium_only error

= 2.0.0 =

*2023-06-07*

* Add: Lowest Price - option to show only on single product page
* Add: Lowest Price - inherit regular price when insufficient price history information is available
* Add: PRO - Price Alerts module
* Add: PRO - Price Alerts trigger button shortcode
* Add: PRO - Line Chart
* Add: PRO - Stepped Chart
* Add: PRO - Chart shortcode
* Add: PRO - Chart range selector
* Update: freemius sdk
* Performance: code optimization
* Compatibility: WC tested up to 7.7

= 1.2.1 =

*2023-05-10*

* Fix: hide chart wrapper if there's no enough prices

= 1.2.0 =

*2023-04-25*

* Fix: tax calculations
* Fix: localization issue
* Add: Chart title option
* Add: Chart max width option
* Add: General options
* Add: Multilingual option
* Add: Delete plugin data upon uninstall option
* Update: chart tooltip, full date
* Update: date range, added 3 months option
* Update: freemius sdk
* Performance: code optimization
* Compatibility: WC tested up to 7.6
* Compatibility: WP tested up to 6.2

= 1.1.3 = 

*2023-04-11*

Fix – error when fetching variation data

= 1.1.2 =

*2023-03-31*

* Fix: lowest price - exclude current price from calculations

= 1.1.1 =

*2023-03-30*

* Tweak: create entry after product object is saved
* Update: freemius sdk

= 1.1.0 =

*2023-03-24*

* Fix: lowest price range without lower range value
* Fix: textdomain typo
* Add: show chart on variable products only when variation is selected
* Add: Chart text color
* Add: Chart background color
* Update: freemius sdk

= 1.0.3 =

*2023-03-17*

* Add: default settings
* Update: temporary hidden Freemius menu items
* Update: readme - FAQ section 

= 1.0.2 =

*2023-03-15*

* Fix: check most recent price before saving to database

= 1.0.1 =

*2023-03-15*

* Fix: get_price_history function arguments
* Update: renamed public namespace to frontend
* Add: Freemius integration

= 1.0.0 =

*2023-03-15*

* First Launch