=== eCommerce Toolkit for WooCommerce ===
Contributors: sofrustrate
Tags: woocommerce, cogs, cost of goods, inventory, ecommerce toolkit
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Modular WooCommerce toolkit with COGS tracking, shared variation inventory, and extensible addon architecture.

== Description ==

**eCommerce Toolkit** is a modular WooCommerce toolkit that gives store owners powerful tools for cost tracking and inventory management -- all under one unified admin panel.

Each feature is a self-contained addon that you can enable or disable independently. The free version ships with essential tools, and Pro unlocks advanced addons individually or as a bundle.

= Free Addons =

**COGS -- Cost of Goods Sold**

* Per-product cost input field in the product editor
* Per-variation cost tracking for variable products
* Category-level cost defaults (set once, apply to all products in a category)
* Global fallback cost in settings
* Cost and margin columns on the Products list table (sortable)
* Quick Edit support for fast cost entry

**Shared Variation Inventory**

* Define a shared stock pool for variable products
* Each variation draws a configurable number of units from the pool per sale
* Automatic stock deduction on order completion
* Automatic stock restoration on cancellation/refund
* Low stock warnings when the shared pool runs low
* Shared pool stock column on the Products list table
* Frontend low stock / out of stock notices

**Settings Panel**

* Toggle addons on/off from a central dashboard
* Configure COGS defaults (display column, global fallback cost)
* Shared inventory low stock threshold
* Data cleanup option on uninstall

= Pro Addons (available separately or as a bundle) =

* **COGS Analytics** -- Margin reports, cost trends over time, category-level profitability dashboards
* **Advanced Inventory Rules** -- Low-stock alerts on shared pool, reorder-point thresholds per product
* **Bulk Operations** -- CSV import/export of COGS data, bulk category cost assignment
* Additional addons released over time

= Why eCommerce Toolkit? =

* **Modular** -- Only enable what you need. No bloat.
* **WooCommerce native** -- Uses standard WooCommerce hooks, meta fields, and admin patterns.
* **HPOS compatible** -- Fully compatible with WooCommerce High-Performance Order Storage.
* **Extensible** -- Pro addons integrate seamlessly. Developers can register custom addons.
* **Lightweight** -- No external API calls, no tracking, no unnecessary JavaScript libraries.

== Installation ==

1. Upload the `bigbad-ecommerce-toolkit` folder to `/wp-content/plugins/`.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Navigate to WooCommerce > eCommerce Toolkit to configure settings and manage addons.
4. WooCommerce must be installed and active.

== Frequently Asked Questions ==

= Does this require WooCommerce? =

Yes. eCommerce Toolkit requires WooCommerce 7.0 or later.

= How does the COGS cost hierarchy work? =

The plugin checks for cost in this order: per-product cost > parent product cost (for variations) > category default cost > global default cost from settings. The first value found is used.

= How does Shared Variation Inventory work? =

When enabled on a variable product, you set a total pool stock quantity. Each variation has a "unit size" (defaults to 1). When a customer buys a variation, its unit size multiplied by the quantity ordered is deducted from the shared pool.

= Will my data be deleted if I deactivate the plugin? =

No. Deactivating the plugin does not delete any data. Data is only removed if you uninstall (delete) the plugin AND have enabled "Delete Data on Uninstall" in the settings.

= Is this compatible with HPOS (High-Performance Order Storage)? =

Yes. The plugin declares HPOS compatibility and uses standard WooCommerce APIs.

= Can I add my own addons? =

Yes. Developers can register custom addons using the `bbetk_register_addons` action hook. See the documentation for details.

== Screenshots ==

1. Dashboard overview showing active addons and plugin status
2. COGS cost and margin columns on the Products list table
3. COGS cost input field in the product editor pricing section
4. Shared Inventory configuration panel on a variable product
5. Settings page with addon toggles and configuration options
6. Addon management page

== Changelog ==

= 1.0.0 =
* Initial release
* COGS addon: per-product cost, category defaults, margin display, quick edit support
* Shared Variation Inventory addon: shared pool stock, per-variation unit deduction
* Settings panel: addon toggles, COGS configuration, shared inventory threshold
* Admin dashboard with addon overview and pro upgrade CTA
* uninstall.php with opt-in data cleanup
* Full i18n support
* WooCommerce HPOS compatibility declared

== Upgrade Notice ==

= 1.0.0 =
Initial release of eCommerce Toolkit for WooCommerce.
