How to Add Discount in WooCommerce

Discounts are an effective strategy for your online store to boost sales. They attract new customers by offering a compelling reason to make a purchase. Luckily, WooCommerce allows sellers to create promotions and discounts to attract customers.

However, do you know how to add discount in WooCommerce? It’s simple if you know the correct method to accomplish this job. That being said, this article shows you two effective methods to add discounts to your store. 

Besides, it discusses various discount types and the main difference between coupons and discounts. Let’s read. 

WooCommerce Discount Types

Before diving into how to add discounts in your WooCommerce store, let’s discuss the discount types you can include. 

  • Percentage discounts: This type of discount refers to lowering the price of a product by a set percentage, like 20% off on all products. 
  • Fixed discounts: Fixed discounts mean you reduce the product price by a fixed amount, like $15 off on all t-shirts. 
  • Category discounts: When you offer discounts on some particular product categories instead of individual or all products, you utilize category discounts. 
  • Product discounts: This refers to applying discounts to selected products. 
  • Cart discounts: Cart discounts are when you offer discounts when customers reach a particular amount in their cart total. 
  • Bulk Discount: As the title suggests, this type of discount means you offer discounts when customers make purchases in bulk. For example, Buy 7 t-shirts and get $15 off.
  • BOGO Offers: Buy One, Get One (BOGO) deals are an attractive strategy to boost sales. You can offer a free or discounted product when a customer buys a product at its original price. 

These are the most common discount types you can encounter in the majority of WooCommerce stores. 

How to Add Discount in WooCommerce Without Plugin (Method 1)

First, we’ll talk about how you can include discounts in your WooCommerce store without a plugin. Later, we’ll discuss how to add discounts using a plugin easily. 

Note that the plugin-less method is ideal for people with technical knowledge and expertise. Do not attempt this method if you don’t know anything about HTML, CSS, Javascript, and PHP. 

Also, this method requires you to know how to take a complete backup of your site and how to utilize a child theme. 

Let’s start.

Step 1: Create a Discount Coupon

To add a discount, first create a coupon that will automatically apply to products when customers add items to their carts. Let’s say you want to offer 10% off on all products. 

To do that, create a coupon with a 10% discount. Thus, head to WordPress Admin Dashboard > Marketing > Coupons.

Go to coupons

Then, click “Add new coupon” button.

2-click add new coupon button

Now, write a coupon code as shown in the screenshot below. Then, head to “Coupon data” area, ensure you’re on ‘General’ tab, click “Discount type” drop-down menu, and choose “Percentage discount” menu.

Write coupon code and set discount type

Then, navigate to “Coupon amount” field area and write down the percentage amount. After that, select a coupon expiry date using “Coupon expiry date” field, and finally, hit ‘Publish’ button.

Set coupon percentage and expiry date

That’s it. We’ll now add a code to the child theme’s “functions.php” file to allow this coupon to automatically apply to products when customers add items to their carts.

Step 2: Insert Apply Discount to Cart Code Snippet into Child Theme

As you can read from the title of this section, we’ll now add a code snippet to our child theme’s “functions.php” file. Why a child theme? It’s because we don’t want to lose this code snippet when our main theme gets an update.

Let’s insert this code. Head to WordPress Admin Panel > Appearance > Theme File Editor. 

Go to theme file editor

Note: You’ll find this file under the ‘Tools’ menu if you utilize a block theme. 

Then, head to the right-hand side and hit “functions.php” file.

Click functions php file of a theme

After that, scroll down to the end of the code section and insert the code snippet below into that empty area.

Insert auto apply coupon code snippet

Finally, click “Update File” button to update “functions.php” file.

Hit update file button

Now, add a product to your cart and visit the cart page to see if the code works.

Test auto apply coupon code

As you can see, this code snippet applies the coupon automatically to the cart. 

What if you want to offer fixed discounts on the cart without creating a coupon code? Can you do that programmatically? Indeed, you can. You need to follow the following steps to accomplish this job. 

Step 3 – Offer a Fixed Discount to Cart Without Creating a Coupon

Let’s say you want to offer a 20% discount to customers when their cart total is equal to or higher than 100. And you want to offer this discount without creating any coupons. 

Okay, let’s do it: copy and paste the code snippet below into your child theme’s “functions.php” file.

Note: You can change the discount percentage as you wish by modifying the code snippet. 

Let’s add this code snippet. We’ll go to WP Admin Panel > Appearance > Theme File Editor. Then, click “functions.php” file on the right sidebar.

Now, scroll down to the bottom area, copy the code snippet below, paste it into that area, and hit “Update File” button.

Modify code and paste it into functions php file

Finally, add products to make the cart total equal to or higher than 100 and see if you get a 20% discount on the total price. 

Test fixed discount code

Step 4 – Add a Code Snippet for BOGO Discounts 

You can copy and paste the code snippet below into your child theme’s “functions.php” file to offer customers BOGO discounts. 

In case you need to know about BOGO discounts, it’s a popular discount type that lets customers get a free quantity of the same product they purchase. That means customers buy one and get one through BOGO discounts.

So, let’s insert the BOGO code snippet below and update the theme file. 

Insert BOGO discount code snippet

Then, add an item to your cart and browse the cart page to see if this code snippet works.

Test BOGO discount code

Step 5 – Include a First-Order Discount Code Snippet

It’s another excellent discount type you can utilize to convert prospects into paying customers. Offer attractive discounts to customers who create new accounts on your store and make their first orders. 

Perform this job by inserting the code snippet below into your child theme’s “functions.php” file and updating the theme file.

Modify first order discount code snippet

Then, check if this code works or not. 

Screenshot of First order discount

These are some excellent discount types, along with their corresponding code snippets. You can comfortably use these code snippets if you are familiar with programming. 

Otherwise, use a third-party plugin like ShopBuilder to add discounts in your WooCommerce store. Here’s how to install and use this WooCommerce store builder plugin. 

How to Add Discount in WooCommerce With Plugin (Method 2)

We’ll now install and activate the ShopBuilder plugin and use it to offer bulk discounts to customers who make bulk purchases. Let’s begin.

Step 1 – Get ShopBuilder Plugin

First, install and activate ‘ShopBuilder’ from the WordPress plugin repository. However, this plugin’s “Bulk Discounts” module is only available on the pro version.

Therefore, we need to purchase this affordable plugin and follow the steps below to install and activate it.

  1. Navigate to WordPress Admin Panel > Plugins > Add New Plugin.
Click add new plugin
  1. Then, hit “Upload Plugin” button on the top left.
Hit upload plugin button
  1. Press “Choose File” button to upload the zip file of the pro version of ‘ShopBuilder’ you received after purchasing this plugin.
Click choose file button
  1. Right now, hit “Install Now” button and wait a moment.
Click Install now button
  1. Lastly, click “Activate Plugin” button.
Hit activate plugin button

That’s how you install and activate the premium version of ‘ShopBuilder’ plugin. Let’s now work with the “Bulk Discounts” module.

Step 2 – Add Bulk Discounts to Your WooCommerce Store

In order to add bulk discounts to a particular product, product category, or tag, first, enable the “Bulk Discounts” module. Thus, go to WordPress Admin Panel > ShopBuilder > Settings.

Go to Settings of ShopBuilder

Then, ensure you are under ‘Modules’ tab and click “Bulk Discounts” tab. 

Click Bulk Discounts tab

You’ll then see a pop-up. Toggle on “Enable Bulk Discount?” switch.

Turn on Enable Bulk Discount switch

Then, head to ‘Settings’ area and explore all the settings. Toggle on a setting switch that you may need and hit ‘Save Changes’ button. Here are the details of each setting.

Show Discount Availability Note: Toggle it on to display the discount availability message in the shop, archive, related, upsell, and cross-sell sections.

Show Discount Availability Note in Product details page: Turn it on to exhibit discount availability message in the product details page.

Enable Cart Discount Message: Toggle it on to notify customers about applied discounts directly in the cart.

Disable Coupons: Turn this setting on to automatically disable coupons for a product with a bulk discount. 

Explore bulk discount settings

Step 3 – Create a Bulk Discount Rule in ShopBuilder

Now, we need to create a discount rule to offer a bulk discount. We will add a rule in this plugin so that we can offer 20% off to customers who purchase more than 5 products. 

To do so, we’ll tap into the “Bulk Discount” tab under the ShopBuilder’s Modules tab. Then, hit “Create Rules” tab. 

Hit Create Rules tab in Bulk Discount module

Now, click “Add New” button on the bottom left.

Click Add New button

After that, write down your discount title in the “Discount Title” field, click “Applicable For” drop-down menu, and select “Products” – you can choose product categories or tags, though.

Write the discount title and select products

Scroll down to utilize other settings. For example, select a product from the “Applicable Products” drop-down menu to apply this discount. You can leave it blank if you want to apply this discount to all products.

Select a product to apply bulk discounts

Then, head to “Discount Type” drop-down menu and select the discount type.

Select discount type

Now, navigate to the “Discount Apply On” drop-down menu and select the product price type you want the discount to be applied on.

Select product price type to apply discount

At this point, head to “Bulk Discount Condition” field and write a discount rule. 

If you wonder how to use discount rules for WooCommerce, here’s how: 5:20 – First, write the number of product quantities, then put a colon (:), lastly, write the number of discount percentages. 

Note: If you want to write multiple conditions, use the pipe symbol ‘|’ in between each discount rule as a separator. For example: 5:20 | 10:30 | 20:35.

After writing the bulk discount rule, click “Save Changes” button.

Define bulk discount condition

Okay, you’ve configured everything. Now, add a product six times and visit your cart page to see the Bulk Discount module in action. 

Screenshot of Bulk Discounts applied

You may read the Bulk Discount module documentation and watch this video on How to Create Bulk Product Discount in WooCommerce with ShopBuilder Plugin to learn more about this module.

These are all the steps to follow to add discounts in your WooCommerce store with a plugin. 

WooCommerce Discounts vs WooCommerce Coupons – Are These Identical?

Many people consider discounts and coupons to be the same. Nonetheless, these WooCommerce options differ from each other. 

Discounts: Discounts provide customers with instant savings. They are seamlessly applied at checkout without requiring customers to enter a code. Discounts come in handy when it’s about site-wide promotions or seasonal sales. They encourage purchases.

Coupons: Coupons require customers to input a unique code at checkout to unlock special offers. This strategy excels in targeted marketing. 

Coupons allow businesses to monitor the performance of individual campaigns, gain insights into customer preferences, and drive engagement through personalized promotions.

We think you now understand the primary differences between WooCommerce discounts and coupons. 

Wrapping Up

That’s all for the article on how to add discount in WooCommerce. You can now easily add discounts to any product on your WordPress store by following one of the methods shown in this article.

Here’s a reminder. We encourage you to follow the 2nd method – add a discount to a product using a plugin. It’s safer, and virtually everyone can utilize this method. Thus, add product discounts and increase sales. We wish you the best of luck.

author
Md. Hasan Biswas is a Technical Content Writer at RadiusTheme. He strives to create engaging, helpful, and impactful content. Beyond writing, Hasan loves cooking, watching movies and TV series, and reading books.