How to restrict a coupon based on product attributes

Smart Coupons provides a powerful, “all-in-one” solution for gift certificates, store credits, discount coupons and vouchers extending the core functionality of WooCommerce coupons.

Restricting coupons based on product attributes is a useful feature when you want to offer a discount based on product attributes. Using this feature, you can include/exclude coupons for some products that have specific attributes.

This doc article explains how you can restrict a coupon based on product attributes.

Product attribute restrictions can be in two ways:

  1. Product attributes that the coupon will be applied to, or that need to be in the cart in order for the discount/gift certificate to be applied.
  2. Product attributes that the coupon will not be applied to, or that cannot be in the cart in order for the discount/gift certificate to be applied.

Steps to restrict a coupon based on product attributes ↑ Back to top

Consider the following sample case: You want to offer a flat discount only when the user adds a red T-shirt to the cart irrespective of other attributes.

  1. Go to Marketing > Coupons
  2. Add/Edit a coupon
  3. Go to Coupon data > General
  4. Select the discount type and set the coupon amount.
  5. Fill in the other details as per your requirements.
  6. Go to Usage restriction > Products > Select T-shirt
  7. Under Attributes, select Color as ‘Red’
  8. Click on Publish/Update

Now, whenever a user adds a red color T-shirt to the cart, the discount coupon can be applied.

If a user adds a black or blue color T-shirt, the coupon won’t be applied.

Steps to exclude a product attribute from a coupon ↑ Back to top

This is exactly the opposite of the above example.

In this case, you want to apply a coupon on all T-shirt colors except for the red color.

So, just like the above example,

  1. Go to Usage restriction > Products > T-shirt
  2. Under Exclude Attributes, select Color as ‘Red’
  3. Click on Publish/Update

So, whenever a user adds a black-color T-shirt or blue color T-shirt, the discount coupon can be applied.

If a user adds a red color T-shirt, the coupon won’t be applied.

Note: It is not compulsory to specify a product/products under Usage Restriction > Products. If a product is not specified, the attribute restriction will work irrespective of the product.

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top