Title: RIACO Smart Quantity Discount for WooCommerce
Author: robertoiacono
Published: <strong>July 28, 2025</strong>
Last modified: June 9, 2026

---

Search plugins

![](https://ps.w.org/riaco-smart-quantity-discount/assets/banner-772x250.png?rev
=3565265)

![](https://ps.w.org/riaco-smart-quantity-discount/assets/icon-256x256.png?rev=3565265)

# RIACO Smart Quantity Discount for WooCommerce

 By [robertoiacono](https://profiles.wordpress.org/prototipo88/)

[Download](https://downloads.wordpress.org/plugin/riaco-smart-quantity-discount.1.1.0.zip)

 * [Details](https://vec.wordpress.org/plugins/riaco-smart-quantity-discount/#description)
 * [Reviews](https://vec.wordpress.org/plugins/riaco-smart-quantity-discount/#reviews)
 *  [Installation](https://vec.wordpress.org/plugins/riaco-smart-quantity-discount/#installation)
 * [Development](https://vec.wordpress.org/plugins/riaco-smart-quantity-discount/#developers)

 [Support](https://wordpress.org/support/plugin/riaco-smart-quantity-discount/)

## Description

**RIACO Smart Quantity Discount** is the easiest way to add powerful, flexible pricing
promotions to your WooCommerce store. Whether you want to reward bulk buyers, run
a Buy-One-Get-One campaign, or offer targeted discounts based on cart value or customer
role, this plugin handles it all from a clean admin interface — no coding required.

### Why store owners love it

**Increase average order value.** Tiered quantity discounts nudge customers to add
one more item to unlock the next deal tier. Show the full pricing table right on
the product page so shoppers always know the best price they can get.

**Run BOGO promotions in minutes.** Set up “Buy 2, Get 1 Free” (or any buy-X-get-
Y ratio) and the plugin automatically adds the free product to the cart. When the
qualifying item is removed, the free item disappears too — no manual cleanup needed.

**Target the right customers.** Apply rules only to specific products or categories,
restrict them to certain user roles (e.g., wholesale members), or trigger them only
when the cart reaches a minimum subtotal. Combine multiple conditions with AND/OR
logic.

**Non-destructive pricing.** The plugin never overwrites WooCommerce’s own sale 
prices with a worse deal. If a product is already on sale, your rules only kick 
in when they give a better price — your existing promotions stay safe.

**Priority-based rule stacking.** Create as many rulesets as you need. Assign each
one a priority number so you stay in full control of which rules are applied first.
No unexpected conflicts, no surprises at checkout.

**Works with block checkout.** Fully compatible with the WooCommerce block cart 
and block checkout. BOGO free items show a “FREE” label, quantity fields are locked,
and the remove button is hidden — giving customers a polished, confusion-free experience.

### Key features

**Discount types**

 * **Simple discount** — apply a flat percentage or fixed amount off a product price,
   with optional conditions.
 * **Quantity / volume discount** — define multiple tiers (e.g., buy 3–5  10% off,
   buy 6+  20% off). A pricing table on the product page shows every tier at a glance.
 * **BOGO (Buy X, Get Y Free)** — automatically add free items to the cart based
   on a configurable buy threshold and free-item quantity.

**Condition targeting**

 * Target specific **products** or **product categories**
 * Restrict by **cart subtotal** (minimum order amount)
 * Restrict by **user role** (great for wholesale or VIP tiers)
 * Combine multiple conditions with **AND / OR** logic

**Rule management**

 * Unlimited rulesets — create as many as your store needs
 * **Priority field** — lower number = evaluated first; full control over application
   order
 * **Activate / Deactivate** individual rules or in bulk without deleting them
 * **Duplicate** any ruleset to a draft copy in one click

**Frontend display**

 * Auto-rendered **pricing table** on product pages for quantity discount rules
 * Auto-rendered **BOGO deal table** on product pages for BOGO rules
 * “FREE” badge on BOGO line items in block cart / checkout

**Developer-friendly**

 * 5 action hooks and 6 filter hooks covering every stage of discount evaluation
 * All strings translatable via standard `__()` with text domain `riaco-smart-quantity-
   discount`
 * Extensible discount types and condition types — add your own via filters

### Developer Hooks

### Actions

**`riaco_sqd_loaded`**
 Fires after all plugin components are initialized. Use this
to register integrations or extensions that depend on the plugin being ready.

**`riaco_sqd_before_apply_discounts( $cart )`**
 Fires once per cart recalculation,
before any ruleset is evaluated. Useful for pre-computation or logging.

**`riaco_sqd_after_apply_discounts( $cart, $discounted_cart_item_keys )`**
 Fires
after all rulesets have been evaluated. `$discounted_cart_item_keys` is an array
keyed by cart item key; each value is `['price' => [...] | null, 'bogo' => [...]
| null]`.

**`riaco_sqd_price_discount_applied( $cart_item_key, $regular_price, $plugin_price,
$ruleset )`**
 Fires whenever a simple or quantity price discount is applied to 
a cart item.

**`riaco_sqd_bogo_item_added( $added_cart_item_key, $parent_cart_item_key, $ruleset)`**

Fires when a new BOGO free item is added to the cart.

### Filters

**`riaco_sqd_active_ruleset_ids( $ruleset_ids )`**
 Modify the ordered array of 
ruleset IDs that will be evaluated. Return a filtered or reordered array.

**`riaco_sqd_item_qualifies_for_ruleset( $qualifies, $product_id, $cart_item_key,
$ruleset )`**
 Override whether a cart item qualifies for a given ruleset. Return`
true` or `false`.

**`riaco_sqd_item_discounted_price( $plugin_price, $cart_item, $cart_item_key, $
ruleset )`**
 Adjust the final discounted price before it is set on the product.
The engine clamps the return value to `max(0, ...)` after this filter, so a negative
return is safe.

**`riaco_sqd_bogo_free_quantity( $desired_free_qty, $cart_item, $cart_item_key, 
$ruleset )`**
 Cap or scale the number of free BOGO items added. Return value is
cast to `int` and floored at `0`.

**`riaco_sqd_condition_result( $condition_met, $type, $operator, $value, $product_id,
$subtotal )`**
 Override the boolean result of any individual condition check. Also
the correct extension point for custom condition types — the built-in evaluation
returns `false` for unknown types; hook here to handle them.

**`riaco_sqd_discount_types( $types )`**
 Append custom discount type slugs to the
allowed list (e.g. from a PRO add-on).

**`riaco_sqd_condition_types( $conditions )`**
 Append custom condition type definitions
to the admin conditions metabox.

## Screenshots

[⌊Admin ruleset editor — create and configure a discount rule with type, conditions,
and priority⌉⌊Admin ruleset editor — create and configure a discount rule with type,
conditions, and priority⌉[

Admin ruleset editor — create and configure a discount rule with type, conditions,
and priority

[⌊BOGO deal configuration — set buy threshold and free-item quantity⌉⌊BOGO deal 
configuration — set buy threshold and free-item quantity⌉[

BOGO deal configuration — set buy threshold and free-item quantity

[⌊Quantity-based discount rule setup with multiple tiers⌉⌊Quantity-based discount
rule setup with multiple tiers⌉[

Quantity-based discount rule setup with multiple tiers

[⌊Simple discount setup — percentage or fixed amount⌉⌊Simple discount setup — percentage
or fixed amount⌉[

Simple discount setup — percentage or fixed amount

[⌊Condition builder — target by product, category, cart subtotal, or user role⌉⌊
Condition builder — target by product, category, cart subtotal, or user role⌉[

Condition builder — target by product, category, cart subtotal, or user role

[⌊Frontend cart showing BOGO free item with locked quantity and FREE badge⌉⌊Frontend
cart showing BOGO free item with locked quantity and FREE badge⌉[

Frontend cart showing BOGO free item with locked quantity and FREE badge

[⌊Frontend cart showing quantity discount applied with conditions⌉⌊Frontend cart
showing quantity discount applied with conditions⌉[

Frontend cart showing quantity discount applied with conditions

[⌊Bulk activate / deactivate rulesets from the admin list table⌉⌊Bulk activate /
deactivate rulesets from the admin list table⌉[

Bulk activate / deactivate rulesets from the admin list table

[⌊Volume pricing table and BOGO deal table displayed on the product page⌉⌊Volume
pricing table and BOGO deal table displayed on the product page⌉[

Volume pricing table and BOGO deal table displayed on the product page

## Installation

 1. Upload the plugin folder to `/wp-content/plugins/`, or install it directly from
    the WordPress plugin repository.
 2. Activate **RIACO Smart Quantity Discount** through the **Plugins** menu.
 3. Go to **Discount Rules** in the WordPress admin sidebar.
 4. Click **Add New** to create your first ruleset, choose a discount type, set your
    rules and conditions, and publish.

That’s it — discounts are applied automatically on the cart and checkout pages.

## FAQ

### Does this work with WooCommerce HPOS (High-Performance Order Storage)?

Yes. The plugin declares full HPOS compatibility.

### Will it conflict with WooCommerce’s built-in sale prices?

No. The engine only replaces a product’s price when the discounted price is lower
than the current price. Your existing WooCommerce sale prices are never overridden
by a worse deal.

### Can I offer “Buy 3 Get 1 Free” (not just Buy 1 Get 1)?

Yes. The BOGO rule lets you configure any buy threshold and any free-item quantity.“
Buy 3 Get 1 Free”, “Buy 2 Get 2 Free”, “Buy 5 Get 2 Free” — all supported.

### Can I show the volume pricing table on the product page?

Yes. For quantity discount rulesets, a pricing table is automatically displayed 
on the product page. For BOGO rulesets, a deal summary table is shown too.

### Can I restrict a discount to specific user roles?

Yes. Add a “User Role” condition and choose which roles qualify. Guests who are 
not logged in are always treated as having no role — so `is_in` conditions correctly
exclude them while `not_in` conditions correctly include them.

### Does it work with the block-based cart and checkout?

Yes. BOGO free items are fully supported in the WooCommerce block cart and block
checkout, with locked quantity controls and a “FREE” label.

### Can I stack multiple discounts on the same product?

Price discounts across multiple rulesets are compared and the best (lowest) price
wins. BOGO discounts are first-wins per item — once a BOGO rule has added free items
for a cart item, subsequent BOGO rulesets skip that item.

### Is the plugin extensible for developers?

Yes. The plugin exposes action and filter hooks at every key step. See the **Developer
Hooks** section below for the full list.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“RIACO Smart Quantity Discount for WooCommerce” is open source software. The following
people have contributed to this plugin.

Contributors

 *   [ robertoiacono ](https://profiles.wordpress.org/prototipo88/)

[Translate “RIACO Smart Quantity Discount for WooCommerce” into your language.](https://translate.wordpress.org/projects/wp-plugins/riaco-smart-quantity-discount)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/riaco-smart-quantity-discount/),
check out the [SVN repository](https://plugins.svn.wordpress.org/riaco-smart-quantity-discount/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/riaco-smart-quantity-discount/)
by [RSS](https://plugins.trac.wordpress.org/log/riaco-smart-quantity-discount/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.0

 * Bulk activate/deactivate and duplicate actions in admin list table
 * Pricing table and BOGO table on product pages
 * Fix: small bugs

#### 1.0.0

 * Initial release
 * Simple, quantity/volume, and BOGO discount types
 * Condition targeting: products, categories, cart subtotal, user role
 * AND/OR condition logic and priority-based rule evaluation
 * BOGO auto-add and auto-cleanup in cart
 * Block cart and block checkout compatibility
 * Full HPOS compatibility

## Meta

 *  Version **1.1.0**
 *  Last updated **2 months ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.6 or higher **
 *  Tested up to **7.0.3**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/riaco-smart-quantity-discount/)
 * Tags
 * [bogo](https://vec.wordpress.org/plugins/tags/bogo/)[buy one get one](https://vec.wordpress.org/plugins/tags/buy-one-get-one/)
   [dynamic pricing](https://vec.wordpress.org/plugins/tags/dynamic-pricing/)[quantity discount](https://vec.wordpress.org/plugins/tags/quantity-discount/)
   [woocommerce discount](https://vec.wordpress.org/plugins/tags/woocommerce-discount/)
 *  [Advanced View](https://vec.wordpress.org/plugins/riaco-smart-quantity-discount/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/riaco-smart-quantity-discount/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/riaco-smart-quantity-discount/reviews/)

## Contributors

 *   [ robertoiacono ](https://profiles.wordpress.org/prototipo88/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/riaco-smart-quantity-discount/)