=== ChandBood – Price History for WooCommerce ===
Contributors: arefsarkhosh
Tags: woocommerce, price history, price chart, bulk editor, elementor
Requires at least: 6.9
Tested up to: 7.0
Requires PHP: 8.1
Requires Plugins: woocommerce
Stable tag: 1.9.12
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Track product price changes, show a price history chart, and edit WooCommerce prices in bulk.

== Description ==

ChandBood keeps an independent price history for WooCommerce products and variations. It records real price changes made through standard WooCommerce product saves, imports, APIs, quick edits, and ChandBood's own bulk editor.

The plugin can show customers a responsive price history chart and table on product pages. Store managers can also review or correct individual history records from the product editor.

= Main features =

* Automatically records regular and sale price changes for products and variations.
* Keeps unlimited history by default, with an optional per-product record limit.
* Provides an AJAX bulk editor for regular price, sale price, and stock status.
* Records price changes made through the bulk editor in the same history.
* Displays a responsive Chart.js price chart with selectable date ranges.
* Includes a price history table and current, lowest, and highest price summaries.
* Provides the `[chandbood_chart]` shortcode for product templates and other content.
* Includes an Elementor product price chart widget when Elementor is active.
* Adds a product metabox for adding, editing, and deleting history records.
* Supports WooCommerce High-Performance Order Storage (HPOS).
* Includes an optional setting to remove ChandBood data during uninstall.

= Performance and privacy =

Chart assets and history data are loaded only after a visitor opens the chart. Large histories are sampled on the server while preserving the first, last, lowest, and highest points. ChandBood does not send store or customer data to an external service.

== Installation ==

1. Upload the plugin ZIP from **Plugins > Add New > Upload Plugin**.
2. Activate ChandBood. WooCommerce must already be active.
3. Open **ChandBood > Settings** to review history and cleanup options.
4. Open **ChandBood > Bulk Price Editor** to filter and edit products.
5. Add the `[chandbood_chart]` shortcode or the Elementor widget where a manual chart trigger is needed.

== Frequently Asked Questions ==

= Does ChandBood change existing product prices during activation? =

No. The initial history task reads current eligible prices and creates missing history records without changing WooCommerce product data.

= Are variation prices tracked separately? =

Yes. Each variation has its own price history and can be selected independently in the customer-facing chart.

= Are bulk price changes added to the history? =

Yes. Successful regular or sale price changes made with the ChandBood bulk editor use WooCommerce CRUD and are recorded by the same tracker.

= Can I limit the number of stored records? =

Yes. History is unlimited by default. An optional setting can retain only a chosen number of recent records for each product or variation.

= Does uninstalling the plugin delete prices? =

No. WooCommerce product prices are never deleted. ChandBood history and settings are removed only when the uninstall cleanup option is enabled.

== Changelog ==

= 1.9.12 =
* Addressed Plugin Check findings for translation placeholders, output escaping, request verification, and documented direct database access.

= 1.9.11 =

* Renamed the plugin to ChandBood and added the new `[chandbood_chart]` shortcode while retaining the legacy shortcode for compatibility.
* Replaced direct script and style output with WordPress-enqueued assets.
* Sanitized every bulk-editor request value before it reaches query filters.
* Removed JSON output from inline script context and moved the lazy loader to an enqueued file.
* Rewrote the plugin directory description and documentation in English.

= 1.9.10 =

* Displayed readable variation attribute names in the bulk editor while retaining slugs as internal identifiers.
* Recorded price changes for out-of-stock products and variations.
* Included eligible out-of-stock products in the initial history process.

= 1.9.9 =

* Stored initial history timestamps using the WordPress site timezone.
* Added a persistent one-time marker for the initial history process.
* Limited the initial task to products and variations without existing history.

= 1.9.8 =

* Added a bounded initial price history task and a manual completion tool.
* Hid comparison statistics when a date range contains only one real record.

= 1.9.7 =

* Removed synthetic chart points so charts and statistics use stored history only.

= 1.9.6 =

* Hardened AJAX, price updates, database errors, scheduled tasks, and custom-role compatibility.
* Improved handling of concurrent saves and partial bulk-operation failures.
