=== RUDEO Price Rules Manager for WooCommerce ===
Contributors: rudeosoft
Tags: woocommerce, discounts, bulk edit, pricing, sale price
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Bulk edit WooCommerce sale prices by category, tag, or attribute with preview, selection, history, rollback, and CSV export.

== Description ==

**RUDEO Price Rules Manager for WooCommerce** lets store managers apply bulk price changes to any product group — product category, tag, or attribute — directly from the WordPress admin.

Every change is logged with full before/after data, so you can roll back any operation with a single click.

**Core features:**

* **Bulk Price Change** — apply a percentage discount, markup, or "remove discount" to products in a group.
* **Universal product groups** — target any WooCommerce attribute (brand, color, size, etc.), product category, or product tag.
* **Product search and selection** — search within the preview table and select or deselect specific products using checkboxes. Only selected products are changed.
* **Preview before applying** — review the full product list with current and calculated prices before any change is made.
* **Batch processing** — large catalogs are processed in configurable batches (1 / 5 / 10 / 25 / 50 products) with a real-time progress bar and stop button.
* **Price rounding** — optional rounding to the nearest 10 / 100 / 500 / 1 000.
* **Full history and rollback** — every operation is saved with product IDs, before/after prices, and operation type. Rollback restores the exact previous state.
* **History filters** — filter by product group, operation type, date range, status, or operation ID.
* **CSV export** — download the price change history as a UTF-8 CSV file (opens correctly in Excel).
* **Settings and diagnostics** — WooCommerce and WP-Cron health check, database table check/repair.
* **Support report** — one-click copy or download of a plain-text diagnostic report for support requests.
* **Optional debug log** — ring-buffer debug log (disabled by default, up to 500 entries).
* **Page cache notices** — reminders to purge your page cache after price changes.

**Safety:**

* Only `sale_price` is ever modified during discount operations — `regular_price` is never changed.
* Products with an existing sale price are skipped during bulk discount to prevent unintended overwrites.
* `sale_price` cannot be set to a value greater than or equal to `regular_price`.
* All AJAX requests are protected by nonce verification and `manage_woocommerce` capability check.

**Privacy:**

* No telemetry, no tracking, no background HTTP requests.
* No customer data, order data, or personal information is collected or transmitted.
* Debug log stores only plugin operation events — no PII.

= Pro add-on =

**RUDEO Price Rules Manager Pro** is a separate add-on that extends this plugin with scheduled, cron-based discount rules. Schedule night discounts, weekend promotions, and time-based campaigns to run automatically.

[Learn more about Pro](https://rudeosoft.com/price-rules-manager/)

== Installation ==

1. Upload the `rudeo-price-rules-manager` 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 **Price Rules** in the WordPress admin menu to start using the plugin.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and active.

= Does this plugin modify `regular_price`? =

No. Only `sale_price` is written during discount operations. `regular_price` is never changed.

= What happens if I apply a discount to products that already have a sale price? =

Products that already have a `sale_price` are skipped during a bulk discount operation. This prevents unintentional overwrites of existing sale prices.

= Can I undo a price change? =

Yes. Every operation is stored in the price history table with before/after data. Use the Rollback button in the History tab to restore the previous state.

= Does rollback work for variations? =

Yes. Both simple products and product variations are fully supported.

= Is there a limit on the number of products? =

No hard limit. Large catalogs are processed in batches to avoid PHP timeouts. You can configure the batch size from 1 to 50 products per batch.

= Can I select only specific products within a group? =

Yes. After preview, use the checkboxes next to each product to select which ones to change. You can also search by product name to quickly find products. Select all and Clear all buttons are provided.

= Does the plugin clear page cache automatically? =

No. The plugin changes prices in WooCommerce but does not interact with page cache plugins. After applying price changes, clear your page cache manually.

= Does the plugin have scheduled discounts? =

Scheduled (time-based, cron-driven) discounts are available in the **RUDEO Price Rules Manager Pro** add-on. This free plugin does not include scheduled discount functionality.

= Does the plugin send any data to external servers? =

No. The plugin makes no external HTTP requests. All operations are local.

= Is the plugin compatible with HPOS? =

Yes. The plugin declares WooCommerce HPOS compatibility.

== Screenshots ==

1. Bulk Price Change screen with product group and pricing controls.
2. Product preview with search, selection, and calculated prices.
3. Real-time batch processing progress.
4. Price change history with filters and rollback.
5. Settings, diagnostics, and support report tools.

== Changelog ==

= 1.0.0 =
* Initial public release.
* Bulk price changes for WooCommerce products by category, tag, or attribute.
* Product search and checkbox selection in preview.
* Select all / clear all controls.
* Preview before applying changes.
* Batch apply with real-time progress bar and stop button.
* Full price change history with filters and pagination.
* One-click rollback for any operation type.
* CSV export of price history (UTF-8 BOM).
* Settings with WooCommerce and WP-Cron diagnostics.
* Support report (copy or download).
* Optional debug log.
* Page cache notices.
* HPOS compatible.
* No telemetry, no external requests.

== Upgrade Notice ==

= 1.0.0 =
Initial release. No upgrade required.
