=== Flowbyte Bulk Edit ===
Contributors: wojciechborowicz
Tags: woocommerce, products, bulk edit, inline edit, mass update
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
Requires Plugins: woocommerce
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Spreadsheet-style bulk and inline editor for WooCommerce products. Filter, click cells to edit, or apply mass changes to thousands of items at once.

== Description ==

Flowbyte Bulk Edit adds a powerful product editor under **Products → Bulk Edit** in your WordPress admin. Stop opening one product at a time — filter your catalog, click any cell to edit it, or run a chunked bulk update across hundreds or thousands of products with a progress bar.

= Filtering =

* Search by product title or SKU
* Filter by category, tag, and any registered product attribute (Color, Size, Brand, etc.)
* Price range and stock-quantity range
* Stock status, product type, post status, and featured flag
* Active filter badges on each section so you always know what's applied

= Inline editing =

Click any cell in the table to edit it. Press Enter to save, Esc to cancel; click outside also saves.

* Name, SKU, regular price, sale price
* Stock quantity (auto-enables manage-stock when you set a value)
* Stock status, post status
* Categories — opens a searchable multi-select popover with hierarchical labels
* Description and short description — open a TinyMCE modal with the full WordPress visual editor

Variable products show their variations as expandable sub-rows; each variation can be inline-edited independently. Editing a variation refreshes the parent's aggregate price range automatically.

= Bulk operations =

Pick "Selected" or "All filtered", choose an action, fill the parameters, and apply. The plugin sends product IDs to the server in chunks of 50 with a cancellable progress bar.

* **Regular and sale prices** — set, increase, or decrease by fixed amount or percent, with optional rounding (.99, .00, whole number)
* **Sale window** — set or clear sale start / end dates
* **Stock** — set quantity, set status, or toggle manage-stock
* **Categories and tags** — add, remove, or replace
* **Shipping class and tax class** — set
* **Status, featured, catalog visibility** — set

Price and stock operations on variable products apply to each variation and re-sync the parent.

= Safety =

* All AJAX endpoints require the `manage_woocommerce` capability and a nonce
* "Apply to all filtered" is capped at 5,000 products per run to keep memory predictable
* Each bulk chunk reports per-product errors that are surfaced in the progress modal — failed products don't stop the batch
* No external HTTP calls, no telemetry, no upsell

== Installation ==

1. Upload the `flowbyte-bulk-edit` folder to `/wp-content/plugins/`, or install it from the WordPress plugins screen.
2. Activate the plugin through the **Plugins** menu.
3. Make sure WooCommerce is active.
4. Go to **Products → Bulk Edit** to start.

== Frequently Asked Questions ==

= Does it work with variable products? =

Yes. Variable products show their variations as expandable sub-rows, and price- or stock-related bulk operations apply to each variation and re-sync the parent's aggregate price range automatically.

= Is there a limit on how many products I can edit at once? =

The "Apply to all filtered" mode is capped at 5,000 products per batch run. Bulk operations are streamed to the server in chunks of 50, and you can cancel mid-flight from the progress modal.

= What happens if a single save fails? =

Inline saves: the cell flashes red, restores the original value, and a toast shows the error (e.g., "SKU already in use", "Sale price must be lower than regular price").

Bulk runs: the failing product is logged in the per-run error list. The batch continues with the remaining products.

= Is it compatible with WooCommerce HPOS (custom order tables)? =

Yes. The plugin only operates on products and never reads or writes orders, so it is HPOS-compatible.

= Are the strings translatable? =

Yes. All strings are wrapped in WordPress translation functions and use the `flowbyte-bulk-edit` text domain.

== Screenshots ==

1. The bulk-edit screen — filter card on top, products in a spreadsheet-style table.
2. Inline editing — click any cell to edit name, SKU, prices, stock, status, or categories.
3. Description modal — full TinyMCE editor with Description and Short Description tabs.
4. Bulk-edit panel — pick an action, fill parameters, apply to selected or all filtered.
5. Progress modal — chunked execution with cancel button and per-product error list.

== Changelog ==

= 1.0.0 =
* Initial release.
* Filterable product table with attribute, category, tag, price, stock, type, status, and featured filters.
* Inline cell editing for name, SKU, regular price, sale price, stock quantity, stock status, post status, and categories.
* Description and short-description editing in a TinyMCE modal.
* Variable products with expandable variation sub-rows.
* Bulk operations: prices, sale window, stock, categories, tags, shipping class, tax class, post status, featured, catalog visibility.
* Chunked, cancellable bulk execution with progress feedback.

== Upgrade Notice ==

= 1.0.0 =
First public release.
