=== BiltsevTools - Price Guard ===
Contributors: biltsevtools
Tags: woocommerce, pricing, admin, products, safety
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Protect WooCommerce stores from accidental large regular price changes by warning or blocking suspicious updates in the admin.

== Description ==

BiltsevTools - Price Guard helps store managers avoid costly pricing mistakes in WooCommerce.

Plugin site:

https://www.biltsev.tech/price-guard-for-woocommerce/

When a product's regular price is changed in the WooCommerce admin, the plugin compares the previous regular price with the new one. If the percentage deviation exceeds your configured threshold, the plugin can either:

* show a warning notice and allow the save, or
* block the suspicious regular price change and restore the previous regular price.

MVP highlights:

* WooCommerce dependency check
* Simple product support
* Variation support for regular price checks
* Configurable percentage threshold
* Warning or blocking mode
* Optional lightweight logging of suspicious changes
* Simple admin log viewer for recorded events
* Scoped admin notices that appear on the same admin screen where the price change was triggered
* Pro workflow to approve a blocked price directly from the admin alert when the change is intentional

== Installation ==

1. Upload the `biltsevtools-price-guard` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the `Plugins` screen in WordPress.
3. Make sure WooCommerce is installed and active.
4. Go to `BiltsevTools > Price Guard` to configure the plugin.
5. Enter and validate your license if you use Pro features.
6. If logging is enabled, review recorded events under `BiltsevTools > Price Guard Logs`.

== Frequently Asked Questions ==

= Does this plugin change frontend pricing? =

No. It only runs in the WordPress admin when products are saved.

= Does it support sale prices? =

No. MVP only checks regular price changes.

= What happens on a brand new product? =

No anomaly check runs when there is no previous regular price.

= Does it work with variations? =

Yes. Variation regular prices are also checked in this version.

= Where are warning notices shown? =

On the same admin screen where the price change was triggered. The plugin avoids showing the same notice on unrelated admin pages or browser tabs.

= Can I allow a blocked change without disabling the plugin? =

Yes. In Pro mode, blocked price alerts include an `Approve this price` action. When clicked, Price Guard applies the blocked regular price immediately and records the action in the log as approved by admin.

== Changelog ==

= 1.1.0 =
* Initial release.
* Added settings page under BiltsevTools.
* Added suspicious regular price detection for simple products and variations.
* Added warning mode and block mode.
* Added optional lightweight logging.
* Scoped admin notices to the initiating admin screen.
* Improved notice delivery for WooCommerce saves and third-party admin workflows.
* Added support for secure license validation through the Biltsev License Bridge endpoint.
