=== Bulk Price and Stock Editor for WooCommerce ===
Contributors: catcodestudio
Tags: woocommerce, bulk edit, price, stock, inventory
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A dedicated screen for editing WooCommerce prices and stock in bulk, with inline edits, filters and a price change history.

== Description ==

Changing the price of a few hundred products through the standard WooCommerce admin means opening a few hundred product pages. This plugin adds a screen of its own: a product table where the price, the sale price, the stock quantity, the stock status and the SKU are edited straight in the row, and every edit is saved in one batch over AJAX with a progress bar.

Every write lands in a journal of its own: what changed, from which value to which, when, and who did it. The history is readable both per product and across the whole catalogue.

= Free features =

* A dedicated "Bulk editor" screen in the WooCommerce menu
* Inline editing of the regular price, sale price, stock quantity, stock status and SKU
* Filters: search by name / SKU / ID, category, product type, status, stock state (including "running out"), on-sale state and a price range
* Sorting by name, SKU, price and stock quantity, with paging
* Batch saving over AJAX with a progress bar — the page never reloads
* Change history in a table of its own: field, before → after, source, author, date, IP
* Settings for the editable fields, the batch size, the "running out" threshold and the journal retention period

= Pro features =

* Mass operations by formula: price ±%, price ±amount, set price, rounding (0.01 / 0.10 / 0.50 / …,95 / …,99 / whole / tens / hundreds), plus a lower and upper price bound
* Sales in bulk: a percentage or an amount off the regular price, a fixed sale price, or clearing the sale
* Scheduled price changes — sale start and end dates, which WooCommerce then switches on and off by itself
* Mass operations for stock quantity, stock status and publication status
* Variation editing: expanding a variable product right inside the table, and mass operations across variations
* CSV export of the whole filtered set, and import with every row validated before anything is written
* Rollback: restoring a single value from the history, or reverting an entire mass operation or import

A fresh install is simply the free tier — nothing Pro is switched on behind your back. Pro features stay visible in their place, greyed out and labelled, and a 7-day trial starts only when you ask for it: WooCommerce → Bulk editor settings → «Try Pro for 7 days», one e-mail field, no card. When the trial ends the free tier (the table, inline editing, filters and the history) keeps working with no time limit. Licences are sold per year (1–5 years).

= Why this is safe for the catalogue =

The plugin never writes prices straight into the database. Every value goes through the WooCommerce CRUD (`wc_get_product()` → `set_*()` → `save()`), so `_price`, the stock status, the lookup tables (`wc_product_meta_lookup`) and the min/max price range of a variable product are all kept in step, and every third-party extension gets the hooks it expects.

= Requirements =

* WooCommerce 7.0 or newer
* PHP 7.4+

The plugin interface is fully translated into Ukrainian. / Інтерфейс плагіна повністю перекладено українською.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/bulk-price-and-stock-editor-for-woocommerce/`
2. Activate it in the "Plugins" menu
3. Go to WooCommerce → Bulk editor, filter the products you need, change the values right in the table and press "Save changes"

== Frequently Asked Questions ==

= Will this break price filtering and sorting in the catalogue? =

No. Writes go through the WooCommerce CRUD, so the lookup tables are updated exactly as they are when a product is saved by hand.

= Why is the price of a variable product shown as "—"? =

A variable product has no price of its own — the price lives in its variations. Expand the product with the button next to its name (Pro), or pick "Automatically" in a mass operation.

= I entered a quantity and it was not saved =

"Manage stock" is switched off for that product. There is a setting that turns stock management on automatically as soon as you type a number.

= The sale price is not being applied =

WooCommerce ignores a sale price that is equal to or higher than the regular price. The plugin rejects such values immediately.

= How many products can one mass operation handle? =

The operation runs in batches over AJAX, so the limit is not the PHP timeout but only the batch size in the settings. A single run covers up to 50,000 products.

= Will the history take up a lot of space? =

The retention period is configurable (365 days by default); a daily WP-Cron job removes older entries.

== Screenshots ==

1. The product table with inline editing and filters
2. A mass operation by formula with its "before → after" preview
3. The price change history with the author and a rollback button
4. CSV import with every row validated before it is written

== Changelog ==

= 1.1.0 =
* The free tier no longer switches Pro on by itself: a fresh install is the free tier until the owner starts the trial.
* The 7-day trial now starts on a click — one e-mail field issues a real licence key and activates it, the same way a purchased key works.
* Licence keys are verified against the CatCode licence server (activate / verify / deactivate) and re-checked daily; Pro keeps working for 14 days if the server is unreachable.
* Pro blocks stay in place, greyed out, with a badge and one line explaining what they add, instead of disappearing or nagging.
* One dismissible notice, shown after the first change is actually saved; dismissing it is permanent.
* The licence key no longer travels with the settings form, so saving settings can never wipe an activated licence.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.1.0 =
Pro no longer turns itself on after installation. If you were relying on the automatic trial, start it yourself in the plugin settings.

= 1.0.0 =
Initial release.
