=== DiscountWise - Bulk Discounts, Quantity & Role Based Pricing for WooCommerce ===
Contributors: hamzaafridi05
Tags: bulk discount, quantity discount, role based pricing, discount rules, woocommerce
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Bulk, quantity, and role-based discounts for WooCommerce. Product, category, or storewide rules, with no slowdown on big catalogs.

== Description ==

DiscountWise adds discount rules to WooCommerce. Set a percentage off, a fixed amount off, a fixed price, quantity tiers, cart subtotal discounts, BOGO, and role-based prices for wholesale or B2B. Each rule can target one product, a category, or the whole store.

It is built to stay fast on large catalogs. DiscountWise compiles all of your rules once, caches the result, and adds no database queries per product on shop and category pages. A store with 5 rules and a store with 50 rules do the same work per page. Rules run only where a price is shown or the cart is calculated, never on every product query.

Category discounts, role-based pricing, the sale badge, and the "You saved" label are all in the free plugin.

= What you can do =

* Percentage or fixed-amount discounts on a product, a category, or the whole store
* Set a fixed price, for example "this product is 9.99 while the rule runs"
* Bulk and quantity tiers, for example buy 3 to 9 save 10%, buy 10 or more save 20%, with a percentage OR a fixed price per tier
* A quantity table on the product page, so shoppers see the tier prices before they add to cart
* Cart subtotal discounts, for example spend 100 and take 10 off the cart
* Role-based pricing for wholesale and B2B, including a separate price for logged-out guests
* BOGO: buy X and get X of the same product free
* Schedule any rule with a start and end date
* Choose how rules combine: apply the biggest, apply the first match, or stack them all, in a priority order you set
* Strike out the old price, show a sale badge, and add a "You saved" line at the cart
* A "Why this price?" tester that shows which rules matched a product for any role and quantity, and the math step by step

= Fast on big catalogs =

Shop and category pages are where a discount plugin can slow a store down. DiscountWise reads from one compiled, cached ruleset, so listing pages stay as fast as plain WooCommerce. The work per page does not grow with the number of rules, and you can confirm that on a staging copy of your store.

= Does discounts, and nothing else =

DiscountWise does discounts. There is no email capture, no marketing automation, no analytics, no loyalty points, and no currency switcher. It stays out of the way and stays fast.

= Works with modern WooCommerce =

* HPOS (High-Performance Order Storage) compatible
* Works with the classic cart and the block cart
* Uses standard WooCommerce template hooks, so it fits themes like Storefront and Twenty Twenty-Five
* No external API calls. Nothing about your store or your customers leaves your server.

= A note from the developer =

I build WooCommerce plugins at DevTonic Studios. I started DiscountWise because I kept needing the same discount types on client stores: role pricing for wholesale, quantity tiers, and category sales, without the shop page slowing down as the catalog grew. This is the plugin I wanted, so I am sharing it. If something does not work on your store, open a thread on the support forum and I will read it.

== Installation ==

1. In wp-admin, go to Plugins, then Add New, and search for DiscountWise. Or upload the plugin zip under Plugins, Add New, Upload Plugin.
2. Activate DiscountWise. WooCommerce must be installed and active first.
3. Open the DiscountWise menu in wp-admin and click Add discount.
4. Pick a discount type, set the amount and where it applies, and save. Your store prices update right away.

== Frequently Asked Questions ==

= Will it slow down my store? =

No. DiscountWise compiles your rules once and caches the result, and it adds no database queries per product on shop and category pages. A store with many rules does the same per-page work as a store with a few. Rules run only where a price is shown or the cart is calculated.

= Does it support wholesale or role-based pricing? =

Yes, in the free version. You can set a different price or discount for any user role, such as a wholesale role, plus a separate price for logged-out guests.

= Can I set bulk or quantity pricing? =

Yes. Add quantity tiers such as buy 3 to 9 save 10%, buy 10 or more save 20%. Each tier can be a percentage or a fixed price. A quantity table can show the tiers on the product page.

= I have several rules on one product. Which one wins? =

You decide. Give each rule a priority, then choose apply the biggest discount, apply the first matching rule, or stack them all. The "Why this price?" tester shows what happened and the math behind the final price.

= Does it work with HPOS and the block cart? =

Yes. DiscountWise declares HPOS compatibility and works with both the classic shortcode cart and the newer block cart and checkout.

= Does DiscountWise send any data anywhere? =

No. There are no external API calls and no tracking. Everything runs on your own server.

= What does BOGO do in the free version? =

The free version does buy X and get X of the same product free. Cross-product Buy X Get Y and free gift products are planned for Pro.

= Will it work with my theme? =

If your theme uses standard WooCommerce template hooks, yes. It is tested with Storefront and Twenty Twenty-Five. The product-page quantity table needs the standard WooCommerce product summary hook, which most themes fire.

== Screenshots ==

1. The discounts list. Every rule is a card with a plain-English summary and an on/off switch. Drag to reorder priority.
2. Adding a rule. Pick the type, the amount, and where it applies. The form changes to match the type you choose.
3. Quantity tiers on the product page. Shoppers see the price for each quantity band before they add to cart.
4. A discounted product on the shop page. Old price struck out, new price shown, with a sale badge.
5. The "Why this price?" tester. Enter a product, a role, and a quantity, and see which rules matched and the math step by step.
6. The cart with a subtotal discount applied and a "You saved" total.

== Changelog ==

= 1.0.0 - 2026-07-01 =
* Initial release.
* Percentage, fixed-amount, and fixed-price discounts for products, categories, and storewide.
* Quantity and bulk tiers, percentage or fixed per tier, with a product-page quantity table.
* Cart subtotal discounts.
* Role-based pricing for wholesale and B2B, plus a guest price.
* BOGO: buy X get X of the same product free.
* Scheduling with start and end dates.
* Rule priority with apply-biggest, apply-first, and stack-all modes.
* Strikeout pricing, sale badge, and "You saved" label.
* "Why this price?" rule tester.
* Simple-mode templates to start common rules in one click.
* HPOS and block cart support. No external calls.

== Upgrade Notice ==

= 1.0.0 =
First release of DiscountWise.
