=== BMS Stock Manager for WooCommerce ===
Tags: woocommerce, inventory, stock management, bulk edit, stock history
Requires at least: 6.6
Requires PHP: 7.4
Tested up to: 7.1
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Manage prices and stock in one grid: manual saving, variations, bulk adjustments, CSV preview, low-stock filters and change history.

== Description ==

BMS Stock Manager adds a dedicated inventory screen under Products > BMS Stock Manager. Search simple products and variations by name, SKU or ID, filter by category or availability, review low-stock items, and update stock without opening every product page.

Features:

* Paginated inventory with product and variation names, SKU and stock settings.
* Regular and sale prices, product publication and variation activation.
* Explicit saving of changed rows only; no automatic save.
* Absolute stock quantities and positive or negative bulk adjustments.
* Stock tracking, availability, backorders and per-product low-stock thresholds.
* CSV export and previewed CSV import with snapshots that detect stale data.
* Per-product conflict detection and database transactions for changes.
* Change history including old and new stock settings, user, date and optional reason.
* History for changes made through WooCommerce's normal product and stock APIs.
* English and French interfaces, with translation-ready source strings.
* WordPress capability checks and protected REST requests.
* Local storage without telemetry, third-party services or subscriptions.

BMS Stock Manager uses WooCommerce product and stock APIs. It supports HPOS because it does not read or write order storage. Native WooCommerce low-stock notification settings remain authoritative.

Requirements: WooCommerce 9.0 or later and the native WooCommerce product data store. Safe production stock updates require MySQL/MariaDB with InnoDB for WordPress products, product metadata and BMS Stock Manager history. SQLite/WordPress Playground is intended for development validation, not proof of production concurrency behaviour.

Version 1 supports whole-number stock quantities. Simple products and variations with independent stock can be edited. Variations that inherit their parent's stock keep their stock fields read-only; prices and activation remain editable. A link opens the parent in WooCommerce. Variable parents, grouped products, external products, fractional-inventory extensions and custom product data stores are outside this version's editing scope.

Bulk operations are processed product by product. Successful rows are saved; failed rows are reported for review. A batch is not an all-or-nothing transaction. Direct database changes by other software cannot be reliably logged.

== Installation ==

1. Install and activate WooCommerce 9.0 or later.
2. Upload the bms-stock-manager folder to /wp-content/plugins/, or upload the ZIP through Plugins > Add New.
3. Activate BMS Stock Manager for WooCommerce.
4. Enable inventory tracking under WooCommerce > Settings > Products > Inventory.
5. Open Products > BMS Stock Manager.
6. Export a CSV or take a database backup before a large stock reconciliation.

On multisite, activate individually on each site. Network activation is intentionally not supported in version 1.

If migrating from Woo Stock Grid, deactivate that old plugin before activating BMS Stock Manager. Both use native WooCommerce data, so no catalog import is needed. Test on a backup first, including disabled variations and shared stock.

== Frequently Asked Questions ==

= Does BMS Stock Manager replace WooCommerce inventory? =

No. It provides another interface to the same product stock data. WooCommerce remains responsible for order stock reductions, reservations, refunds and stock notifications.

= Can CSV files overwrite changes made after export? =

Every exported row includes a snapshot. The import checks the snapshot immediately before writing. A row whose inventory values changed is rejected and must be refreshed. Preserve the snapshot and product ID columns. CSV imports update existing products; they do not create products or match a new product by SKU alone.

= What happens if a batch has errors? =

Each product is handled separately. Successful products remain saved and errors identify the rows requiring attention. Refresh and review failed rows before retrying.

= Why are a variation’s stock fields read-only? =

WooCommerce can store stock on the parent of a variable product. BMS Stock Manager does not change the stock owner implicitly. Use the edit link to manage shared stock on the parent in WooCommerce.

= Does it send inventory or personal data elsewhere? =

No. The history is stored in your WordPress database. It contains product identifiers, names, stock settings, dates, optional reasons and WordPress user IDs. User display names are resolved locally when history is viewed. Avoid entering personal information in reasons. Standard WordPress personal-data export and erasure tools include BMS Stock Manager data.

= Is history removed when I deactivate or uninstall? =

Deactivation keeps all data. Uninstalling also keeps BMS Stock Manager history by default. An administrator can explicitly enable deletion in the BMS Stock Manager settings before uninstalling. Only BMS Stock Manager's history table and options are removed; WooCommerce products and stock remain intact.

= Are all stock changes logged? =

BMS Stock Manager records its own changes and changes made through the normal WooCommerce product and stock hooks while the plugin is active. It cannot observe direct SQL writes, changes made while inactive, or software bypassing these APIs. Native WooCommerce changes use the source "woocommerce" and may have a system actor; they are not associated with an order number in version 1.

== Changelog ==

= 1.0.0 =
* First release: prices and inventory workspace, bulk adjustments, CSV tools, stock history, conflict checks, and English/French translations.

== Upgrade Notice ==

= 1.0.0 =
Initial release. Test stock workflows on a staging copy before deploying to a live shop.
