Table of Content

HomeBlogPlugin UsageHow to set up free gifts if us...

How to set up free gifts if users buy from specific categories?

Offering free gifts when customers buy from specific categories is very popular. Store managers choose this method to increase the sale of one or more categories on their website. It is obvious that when customers know that a free gift is waiting for them by buying products from one or more specific categories, they will pay more attention to those categories and may place an unplanned purchase to receive the gift.

To set up free gift if user buy from specific categories, you can consider different rule methods which depends on your strategy for offering the promotion. In this tutorial of free gifts for WooCommerce plugin, we will help you to setup a free gift if users buy from specific categories according to “buy x get y” method.

The aim of offering this free gift is:

If customers buy any products from “iCat” category, they will receive two free gifts from “music” category

Let’s set up this free gift in our plug-in by following four simple steps:

Step 1: Add a new rule and choose the right method

Adding a new rule in our plug-in is simply possible through the WordPress dashboard.

By clicking on “Rules l setting” from your admin panel of WordPress after installation of our plug-in, the Rule page will be opened and you are able to add new rule by clicking on their related button.

By pressing “add rule” button, you can see the rule form containing the below sections:


As we mentioned above, you need to choose the right method to set up your free gift on our plug-in. All of the possible methods using for offering a free gift are listed in a combo box.

As the gift we want to offer to the customers is not from the same category that they are buying products, we have to choose “buy x get y” method.

choose a method Buy X get Y in WooCommerce product gift plugin

Rule name

To set up a free gift in our plug-in, you need to assign a name to your rule. For example, we typed gift for a specific category under the “Rule name” field.


Filling this field is optional in our plug-in. you can add a brief description about your free gift here if you want.

add description to new gift rule in woocommerce free gift plugin

Step 2: set the amount for buy x get y method

In the “quantities and settings” section, you have to specify x and y under Buy and Get fields, respectively. According to our strategy, if customers by 3 products from “iCat” category they will get 2 free gifts from “music” category, so, we typed 3 and 2 under buy and get Fields, respectively

There is also other setting that you need to set them according to your strategy. In this tutorial, we marked “same gift” but keep “auto add gift to cart” unmarked.

In this way, customers can choose their preferred free gift from the list of products offered to them related to the “music” category.

set custom amounts of buy X get Y method

Step 3: Choose the specific categories in the buy section 

To set up a free gift if users buy from specific categories, you need to add those categories under the “Products- buy” section by following the below instructions

  • Press “Add product” button
  • Open the first combobox and find “product” item
  • Choose “product category” under this item
set get products to free gift if users buy from specific categories
  • Select “in list” from the 2nd combobox
  • Type “a” to see the product categories
  • Choose “iCat” from the list
choose categories for free gift if users buy from specific categories in WooCommerce product gift plugin

Note: there is no limitation for adding product categories under “product buy” section which means you can add as many product categories as you want to let customers receive the free gift by purchasing any product from them.

Step 4: Specify the free gift

In this section, you can instruct a plug-in to offer free gift from one or more categories to your customers. To do this, you need to:

  • Type a letter like “m” in the “include category /tag/ taxonomy” field
  • Choose “music” from the list of categories
Specify the free gift in woocommerce free gift plugin

Note: in this section you can add as many products or categories as you want to be offered as a free gift to your customers. You can also exclude some products or categories from the list of free gifts.

By pressing “Save changes”, this promotion will be activated on your online store, successfully.

Customer view

Now, let’s see how customer can receive this free gift after purchasing from your online shop.

As you can see in the below picture when a customer buy some products with the total quantity more than 3 from “iCat” category, a combo box will be appeared under the cart page and ask them to “Select their gift” from a list which is obviously related to the “music” category.

customer view for select gift in WooCommerce product gift plugin

Like this tutorial?

Do you still have a problem?

If you still have unanswered questions or need custom work for your plugin, contact iThemeland Support.


Notify of
Inline Feedbacks
View all comments