=== QtyPilot for WooCommerce ===
Contributors: ansar317
Tags: woocommerce, minimum order quantity, maximum order quantity, quantity rules, bulk order
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Set minimum, maximum, and step order quantity rules for WooCommerce products, categories, and individual product variations.

== Description ==

**QtyPilot for WooCommerce** lets store owners control exactly how many units of a product a customer can buy. Stop unprofitable one-item orders, prevent stock from being wiped out by a single bulk buyer, and enforce case-pack or carton quantities — all without touching a line of code.

The plugin covers three levels of control:

*   **Global rules** for any Simple Product you select, applied instantly.
*   **Category rules** so every product in a chosen category shares the same minimum and maximum, saving you from configuring products one by one.
*   **Per-variation rules** for Variable Products, where each variation (size, color, pack size, etc.) can have its own independent minimum, maximum, and quantity step — completely separate from its sibling variations.

= Key features =

*   Set a minimum and/or maximum purchase quantity for Simple Products, individually or by category.
*   Configure independent minimum, maximum, and quantity-step rules per variation on Variable Products.
*   Optional "quantity step" so customers can only order in multiples (e.g. packs of 6).
*   Automatic cart correction: quantities outside the allowed range are adjusted with a clear notice, both on the Cart page and at Checkout.
*   Blocks Add to Cart (including AJAX add-to-cart) when a requested quantity is invalid.
*   Customizable customer-facing notice banner (text, background color, text color) shown on the product page.
*   Per-variation notice label override, so each variation can show its own message when needed.
*   Dedicated settings screen in your WordPress admin sidebar — no existing menus are modified.
*   Lightweight: only loads its assets on the settings screen and product edit screens.

= How rule priority works =

A Variable Product's own variation settings always take priority. Global and category rules never apply to Variable Products or their variations — only to Simple Products. This keeps bulk category rules from accidentally overriding the specific limits you set on a product's variations.

= Who is this for? =

Wholesale and B2B stores, stores selling perishable or limited stock, print-on-demand or made-to-order shops, and any WooCommerce store that needs to enforce minimum order quantities (MOQ) or maximum purchase caps per product, category, or variation.

== Installation ==

1. Upload the plugin ZIP file via **Plugins > Add New > Upload Plugin** in your WordPress admin, or upload the extracted folder to `/wp-content/plugins/` via FTP.
2. Activate the plugin through the **Plugins** screen.
3. Go to **QtyPilot** in your WordPress admin sidebar (its own top-level menu) to set global minimum/maximum rules and choose which Simple Products or categories they apply to.
4. To set limits on a Variable Product, edit the product, open the **Variations** tab, expand a variation, and fill in its QtyPilot fields.

== Frequently Asked Questions ==

= Where do I configure the rules? =
Everything is managed from the plugin's own **QtyPilot** menu in the WordPress admin sidebar (a top-level menu, not nested under Products). Per-variation rules are set directly on each Variable Product's Variations tab.

= Does this work with Variable Products? =
Yes. Each variation gets its own independent minimum, maximum, and step fields on the Variations tab. Variation rules are never shared with or inherited from sibling variations.

= Can I set rules for a whole category instead of one product at a time? =
Yes, on the settings screen you can apply the Global Rule to specific categories in addition to, or instead of, individually selected products.

= What happens if a customer already has an invalid quantity in their cart? =
The plugin automatically corrects the quantity to the nearest allowed value on the Cart page and at Checkout, and shows a notice explaining the change.

= Does this plugin require WooCommerce? =
Yes, WooCommerce must be installed and active. The plugin will show an admin notice if it isn't.

== Screenshots ==

1. Global quantity rules and Simple Product/category selectors on the QtyPilot settings screen.
2. Customer notice banner and quantity step in action on a Simple Product page.
3. Per-variation minimum, maximum, and step fields on the Variations tab of a Variable Product.
4. Quantity limits applied automatically when a customer selects a variation on the product page.

== Changelog ==

= 1.0.1 =
* Fix: Use the qtypilot-for-woocommerce text domain for all translatable strings.

= 1.0.0 =
* Initial release.
* Global and category-level quantity rules for Simple Products.
* Independent per-variation quantity rules for Variable Products.
* Automatic cart quantity correction with customer notices.
* Customizable notice banner text and colors.

== Upgrade Notice ==

= 1.0.1 =
Fixes the text domain used by translatable strings.
