=== Kabook Bulk Discount ===
Contributors: saeidafshari
Requires Plugins: woocommerce
Tags: woocommerce, bulk discount, quantity discount, tiered pricing, dynamic pricing
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add quantity-based bulk discounts to WooCommerce products with flexible pricing tiers and optional coupon conflict prevention.

== Description ==

Kabook Bulk Discount helps WooCommerce store owners create quantity-based discount tiers that encourage larger purchases.

You can define flexible bulk pricing rules, show customers the available discount tiers on product pages, and automatically apply the correct discount in the cart based on quantity.

This plugin is suitable for stores that want simple, reliable bulk discount logic without a complex setup.

= Features =

* Create flexible bulk discount tiers based on quantity.
* Apply discounts per product quantity or based on total cart quantity.
* Optionally disable bulk discounts when a coupon is applied.
* Show a discount table on single product pages.
* Display live discounted pricing as quantity changes.
* Support simple and variable WooCommerce products.
* Validate discount rules in the admin area.
* Translation ready.

= Compatibility =

* WordPress: 5.8 or higher.
* Tested up to WordPress: 7.0.
* PHP: 7.4 or higher.
* Requires WooCommerce to be installed and active.
* Compatible with current WooCommerce versions used during plugin testing.

= How It Works =

1. Enable the plugin from the WooCommerce settings area.
2. Add one or more discount rules with minimum quantity, optional maximum quantity, and discount percentage.
3. Choose how discount calculation should work.
4. Customers see the pricing tiers on the product page.
5. The plugin applies the matching bulk discount automatically in the cart.

== Installation ==

1. Upload the `kabook-bulk-discount` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the `Plugins` screen in WordPress.
3. Make sure WooCommerce is installed and activated.
4. Go to `WooCommerce > Settings > Bulk Discount`.
5. Configure your discount rules and save the settings.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and activated for the plugin to work.

= Does it work with variable products? =

Yes. The plugin supports both simple and variable WooCommerce products.

= Can I prevent bulk discounts when a coupon is used? =

Yes. You can enable the coupon conflict option in the plugin settings to stop bulk discounts when a coupon is applied.

= Can I leave the maximum quantity empty? =

Yes. If the maximum quantity is empty, the rule is treated as open-ended, such as 10 or more.

= Does the plugin show discounts on the product page? =

Yes. It can display a discount table and live pricing updates based on the selected quantity.

== Screenshots ==

1. Bulk Discount settings tab in WooCommerce.
2. Discount rules table on the single product page.
3. Live discounted price display based on quantity.
4. Bulk discount applied automatically in the cart.

== Changelog ==

= 1.0.1 =
* Bugfix: temporarily disabled the legacy product-level bulk discount tab to prevent inconsistent admin behavior.
* Internal cleanup for a future product-specific discount rules update.

= 1.0.0 =
* Initial release.
* Added quantity-based bulk discount rules.
* Added product page discount table.
* Added live frontend price calculation.
* Added cart-based discount application.
* Added coupon conflict prevention option.
* Added admin-side validation for discount rules.
* Added support for simple and variable products.

== Upgrade Notice ==

= 1.0.1 =
This update temporarily disables the legacy product-level bulk discount tab to prevent inconsistent admin behavior.

= 1.0.0 =
Initial release of Kabook Bulk Discount.