Title: Required Products Coupons for WooCommerce
Author: runthings.dev
Published: <strong>22. veljače 2025.</strong>
Last modified: 11. veljače 2026.

---

Pretraga dodataka

![](https://ps.w.org/runthings-wc-coupons-required-products/assets/banner-772x250.
png?rev=3244950)

![](https://ps.w.org/runthings-wc-coupons-required-products/assets/icon-256x256.
png?rev=3244950)

# Required Products Coupons for WooCommerce

 Od [runthings.dev](https://profiles.wordpress.org/runthingsdev/)

[Preuzmi](https://downloads.wordpress.org/plugin/runthings-wc-coupons-required-products.1.3.0.zip)

 * [Detalji](https://hr.wordpress.org/plugins/runthings-wc-coupons-required-products/#description)
 * [Recenzije](https://hr.wordpress.org/plugins/runthings-wc-coupons-required-products/#reviews)
 *  [Instalacija](https://hr.wordpress.org/plugins/runthings-wc-coupons-required-products/#installation)
 * [Razvoj](https://hr.wordpress.org/plugins/runthings-wc-coupons-required-products/#developers)

 [Podrška](https://wordpress.org/support/plugin/runthings-wc-coupons-required-products/)

## Opis

This plugin allows you to restrict the usage of WooCommerce coupons unless specific
products or variations are in the cart.

You can specify which products are required for a coupon to be valid, providing 
more control over your discount strategies.

#### Features

 * Restrict coupon usage based on all required products (including variations) being
   in the cart.
 * Customize the error message via a filter.

### Filters

#### runthings_wc_coupons_required_products_missing_products

This filter allows third-party plugins to alter the missing required products before
the coupon is rejected.

For detailed documentation and advanced examples, see the [full documentation on GitHub](https://github.com/runthings-dev/runthings-wc-coupons-required-products#filters).

Parameters:

 1. **`$missing_products`** (`array`): The missing products in the cart, in the format`[
    product_id => quantity]`.
 2. **`$coupon`** (`WC_Coupon`): The coupon object being validated.
 3. **`$required_products`** (`array`): The required products for the coupon, in the
    format `[product_id => quantity]`.
 4. **`$cart_products`** (`array`): Products found in the cart, in the format `[product_id
    => quantity]`.
 5. **`$cart`** (`WC_Cart`): The cart instance.

#### runthings_wc_coupons_required_products_error_message

This filter allows customization of the error message shown when a coupon is not
valid due to missing required products.

For detailed documentation and advanced examples, see the [full documentation on GitHub](https://github.com/runthings-dev/runthings-wc-coupons-required-products#filters).

Parameters:

 1. **`$message`** (`string`): The default error message, e.g., `"This coupon requires
    specific products in the cart."`.
 2. **`$coupon`** (`WC_Coupon`): The coupon object being validated.
 3. **`$required_products`** (`array`): The required products for the coupon, in the
    format `[product_id => quantity]`.
 4. **`$missing_products`** (`array`): The missing products in the cart, in the format`[
    product_id => quantity]`.

### License

This program is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software Foundation;
either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY 
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this
program; if not, see [http://www.gnu.org/licenses/gpl-3.0.html](http://www.gnu.org/licenses/gpl-3.0.html).

Icon – Discount by Gregor Cresnar, from Noun Project, https://thenounproject.com/
browse/icons/term/discount/ (CC BY 3.0)

Icon – restriction by Puspito, from Noun Project, https://thenounproject.com/browse/
icons/term/restriction/ (CC BY 3.0)

## Snimke zaslona

[⌊Coupon settings page with required products fields.⌉⌊Coupon settings page with
required products fields.⌉[

Coupon settings page with required products fields.

[⌊Example denied coupon usage due to missing required products.⌉⌊Example denied 
coupon usage due to missing required products.⌉[

Example denied coupon usage due to missing required products.

[⌊Example denied coupon usage due to missing required products, with custom message.⌉⌊
Example denied coupon usage due to missing required products, with custom message
.⌉[

Example denied coupon usage due to missing required products, with custom message.

## Instalacija

 1. Upload the plugin files to the `/wp-content/plugins/runthings-wc-coupons-required-
    products` directory, or install the plugin through the WordPress plugins screen
    directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress.
 3. Go to WooCommerce area of the admin panel, and look under Marketing > Coupons and
    edit or create a coupon.
 4. In the “Usage restriction” tab, you will see the option to select required products
    for the coupon.

## Pitanja i odgovori

### What is the difference between the built-in WooCommerce “Products” field and this plugin?

The built-in WooCommerce “Products” field allows you to specify products that the
coupon can be applied to.

This means that the discount will be applied if _any_ of the specified products 
are in the cart.

In contrast, this plugin restricts the usage of the coupon unless _all_ of the specified
products are in the cart.

This means that the coupon will not be valid unless every required product is present
in the cart.

### How do I restrict a coupon to specific products?

Edit the coupon and go to the “Usage restriction” tab.

In the “Required products” section, select the products that must be in the cart
for the coupon to be valid.

### Can I use this plugin with other WooCommerce coupon restrictions?

Yes, this plugin works alongside other WooCommerce coupon restrictions such as minimum
spend, maximum spend, and role restrictions.

### Can you implement a specific variation I need for the required products?

Specific variations are supported in the required products selector.

The plugin has been kept deliberately simple for now, because this met the clients
specific needs.

There are lots of other combinations of requirements that I can think of like excluding
products, involving quantities, requiring x products in a category, etc.

If you have a specific requirement, and time allows, I’ll try to implement it.

Please open an issue on the GitHub repo, over at https://github.com/runthings-dev/
runthings-wc-coupons-required-products

## Recenzije

Nema recenzija za ovaj dodatak.

## Suradnici i Programeri

“Required Products Coupons for WooCommerce” je softver otvorenog koda. Sljedeće 
osobe su doprinijele ovom dodatku.

Suradnici

 *   [ runthings.dev ](https://profiles.wordpress.org/runthingsdev/)

[Prevedite “Required Products Coupons for WooCommerce” na svoj jezik.](https://translate.wordpress.org/projects/wp-plugins/runthings-wc-coupons-required-products)

### Zainteresirani ste za razvoj?

[Pregledajte kôd](https://plugins.trac.wordpress.org/browser/runthings-wc-coupons-required-products/),
pogledajte [SVN spremište](https://plugins.svn.wordpress.org/runthings-wc-coupons-required-products/)
ili se pretplatite na [dnevnik razvoja](https://plugins.trac.wordpress.org/log/runthings-wc-coupons-required-products/)
od [RSS](https://plugins.trac.wordpress.org/log/runthings-wc-coupons-required-products/?limit=100&mode=stop_on_copy&format=rss).

## Dnevnik promjena

#### 1.3.0 – 11th February 2026

 * Add `runthings_wc_coupons_required_products_missing_products` filter for custom
   required-product validation.
 * Document variation support and the new filter.
 * Fix required product checks to support product variations.

#### 1.2.2 – 6th January 2026

 * Fixed missing “And” separator in the coupon usage restriction panel to match 
   WooCommerce core styling.
 * Move plugin directory assets to .wordpress-org/ folder.
 * Bump WordPress tested up to field to support 6.9 branch.

#### 1.2.1 – 24th June 2025

 * Bump WordPress tested up to field to support 6.8 branch.

#### 1.2.0 – 6th March 2025

 * Fixed a bug which caused a valid voucher to fail to verify.

#### 1.1.0 – 7th February 2025

 * Incorporate amends requested for WordPress plugin directory submission.
 * Filter `runthings_wc_coupons_required_products_error_message` to customize error
   message.
 * Filter `runthings_wc_coupon_required_products_error_message` deprecated.

#### 1.0.0 – 29th January 2025

 * Initial release.
 * Restrict coupons by required products.
 * Filter `runthings_wc_coupon_required_products_error_message` to customize error
   message.

## Meta

 *  Version **1.3.0**
 *  Zadnje ažuriranje **prije 8 mjeseci**
 *  Aktivnih instalacija **Manje od 10**
 *  WordPress inačica ** 6.4 ili viša **
 *  Testirano do **6.9.10**
 *  PHP inačica ** 8.0 ili viša **
 *  Language
 * [English (US)](https://wordpress.org/plugins/runthings-wc-coupons-required-products/)
 * Oznake
 * [coupons](https://hr.wordpress.org/plugins/tags/coupons/)[discount](https://hr.wordpress.org/plugins/tags/discount/)
   [woocommerce](https://hr.wordpress.org/plugins/tags/woocommerce/)
 *  [Napredni pogled](https://hr.wordpress.org/plugins/runthings-wc-coupons-required-products/advanced/)

## Ocjena

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/runthings-wc-coupons-required-products/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/runthings-wc-coupons-required-products/reviews/)

## Suradnici

 *   [ runthings.dev ](https://profiles.wordpress.org/runthingsdev/)

## Podrška

Želite nešto reći? Potrebna vam je pomoć?

 [Pregledaj forum za podršku](https://wordpress.org/support/plugin/runthings-wc-coupons-required-products/)