Setup WooCommerce Percentage Discount

How to Setup WooCommerce Percentage Discount (Easy Guide)

eCommerce/WooCommerce percentage discount is one of the most popular and effective ways to attract customers to your WooCommerce store. This type of discount reduces the cart total by a percentage, giving your shoppers more incentive to complete their purchases.

WooCommerce percentage discounts are a powerful tool for boosting sales and encouraging repeat business. By offering a percentage off on selected products, you can not only entice customers to buy but also increase their average order value.

In this guide, we’ll walk you through three methods for setting up WooCommerce percentage discounts: using a dedicated discount plugin, WooCommerce’s built-in coupon system, and implementing custom code.

Let’s get started.

How to Create a WooCommerce Percentage Discount?

The easiest and most effective way to create automated percentage discounts in WooCommerce is by using a plugin. With the help of a plugin, you can create an extensive array of personalized percentage discounts tailored to different customer groups and shopping behaviors.

This approach not only simplifies the process but also gives you greater flexibility in setting up targeted percentage discount WooCommerce strategies that boost sales and improve customer satisfaction.

The WooCommerce discount percentage plugin we highly recommend and will use in this article is called Disco – Dynamic Discount Plugin for WooCommerce.

Disco WooCommerce percentage discount plugin

The Disco plugin is a fantastic tool for anyone looking to create flexible, automated discounts on their WooCommerce store. With Disco, setting up percentage discounts, free shipping offers, or bulk discounts is incredibly straightforward.

The plugin provides an intuitive interface that even non-technical users can navigate with ease. You can customize discount rules based on product categories, cart totals, customer roles, and more which gives you the ability to run targeted promotions effortlessly.

One of the standout features of Disco is its versatility. Whether you’re running a small shop or a large online store, the plugin scales well to meet your needs.

It also supports advanced conditions, like offering discounts to returning customers or those who reach a certain spending threshold. Let’s get back to creating a WooCommerce percentage discount.

Here is the step-by-step process to display discount percentage in WooCommerce.

Step 1: Install and Activate the Disco Plugin

  1. Go to your WordPress admin dashboard and navigate to Plugins > Add New.
  2. Search for “Disco” and install it.
Install Disco
  1. Activate the plugin.
  2. Once activated, go to WordPress >> Disco menu to access the plugin settings.
Disco menu

Step 2: Create a New Discount

Click the ‘Create a Discount’ button.

Create a WooCommerce percentage discount

It will lead you to the new discount window.

Discount window

Step 3: Select the Discount Category

Give your discount rule a name.

WooCommerce percentage discount

Percentage is a fundamental discount type and works with all possible discounts. Therefore, select any discount type from the Discount Intention section.

Step 4: Select the Product or Products

For this example, we will select All Products. You can also set discount offer validity dates from here.

all products

Step 5: Set the Discount Type and Amount

Let’s say you want to offer a 10% storewide discount.

  • Set the discount type to “Percentage.”
  • Enter the desired discount percentage in the designated field.
percentage value

Step 6: Save and Test the Discount

Click on the “Save” button to save your changes.

save rule

To test your rule, go to the front and add some products to the cart. Disco will automatically apply a 10% discount to the cart total.

WooCommerce percentage discount

If you are wondering how to show discount percentage in WooCommerce, here’s the good news: Disco automatically show discount percentage WooCommerce on individual products pages, Shop, and category pages.

WooCommerce percentage discount

Exploring Different WooCommerce Percentage Discount Strategies

Offering the right percentage discounts can significantly boost your WooCommerce store’s sales and engagement. Whether you’re looking to reward loyal customers, encourage bulk purchases, or promote specific products, there’s a discount strategy that fits every situation.

Below, we’ll dive into some powerful percentage discount strategies and show how to set them up in WooCommerce using Disco.

How to Create Cart-Based WooCommerce Percentage Discount?

Scenario: You want to offer a discount when customers spend a certain amount.

Example:

  • Condition: Spend $100 or more.
  • Discount: 10% off the entire cart.

To set this rule, select the Cart discount intention.

cart discount

If you want to set this up as a WooCommerce storewide discount, select All Products from the Discount section.

all products

Set the percentage value as we did before.

discount value

Now, we need to add a condition.

add condition

Condition filters let you customize your discount rules based on different criteria. For example, you can customize your discount based on a customer’s purchase history, location, user role, or based on different product attributes.

Disco conditions

This helps you create more targeted and relevant discounts. Disco offers a wide range of conditions that allow you to personalize and enhance your discounts.

For this particular example, we will need the Cart Subtotal condition.

cart subtotal

The Greater Than or Equal option will ensure customers who add a minimum of $100 or more worth of items to the cart can avail of the discount.

cart value

Save and add some products in the front to reach a $100 subtotal. Here’s how Disco display discount percentage WooCommerce for this cart-based rule.

cart based discount

How to Create Product-Specific WooCommerce Percentage Discount?

Scenario: You want to offer discounts on specific products in your store.

Example:

  • Condition: Product X gets 20% off.
  • Discount: 20% on Product X only.

Our target product for this example is a “Happy Ninja” hoodie. Start by selecting the Product option from the Discount Intention section.

product discount

This time, we need to select the Few Products option instead of all products.

few products

From the search box, search and select your target product.

select product

Set your WooCommerce product discount percentage from the following section.

set value

Save the rule. Before we test with the target product, let’s select a different product.

not applied

As you can see, no discount has been applied. Now, add the target product to the cart.

WooCommerce percentage discount

Disco also lets WooCommerce show percentage discount on the target product page as well.

product page

How to Create Category-Based Percentage Discount?

Scenario: You want to offer a discount for all products in a particular category.

Example:

  • Condition: All items in the “T-shirt” category get a 15% discount.
  • Discount: 15% on all t-shirts.

You can select either the Product or the Cart option for this discount.

Intention and products

Select All Products, as we are offering discounts on all products under our target category. Input the WooCommerce percentage discount value. After that, hit the Add Condition button to add a condition.

add condition

Select the Categories filter.

categories filter

Search and set your target category and save the rule.

set filter

Products under the T-shirt category should already start displaying the discounted rates in your front store.

WooCommerce percentage discount

How to Create Quantity-Based WooCommerce Percentage Discount?

Scenario: You want to encourage bulk purchases by offering a percentage discount based on quantity.

Example:

  • Condition: Buy 5 or more items, and get 20% off.
  • Discount: 20% off the total cart if a customer buys 5 or more items.

This time, we will use the Bulk Discount option.

bulk discount

We will continue with all products.

all products

As our quantity range is from minimum 5 to unlimited, we will input the minimum value to the appropriate box and keep the maximum value empty for unlimited entries.

set value

Select the percentage option and insert your discount amount. Save the rule and add 5 or more products to the cart.

discount applied

WooCommerce applied a 20% discount on the cart as expected.

How to Create Customer Role-Based Percentage Discount?

Scenario: You want to reward specific customer roles with a discount.

Example:

  • Condition: Offer 5% off to newsletter subscribing customers.
  • Discount: 5% off the entire cart for customers with the “Subscriber” role.

You are offering a 5% discount to customers who subscribe to your email newsletter list. First, select the Cart option and All Products, as this is a store-wide discount.

cart all products

Set your discount value in the Cart Rules section.

set value

Add the condition called User Role.

user role

Select and set your target user role from the list. Now, your mail list/newsletter subscribers can enjoy a 5% discount on their next purchase.

select user

How to Create First-Time Buyer WooCommerce Percentage Discount?

Scenario: You want to offer a discount to first-time buyers to encourage their purchase.

Example:

  • Condition: First-time customers get 15% off.
  • Discount: 15% discount for the customer’s first order.

Again, select the Cart and All Products options.

cart discount

Enter your target percentage amount.

value defined

Add the following condition.

is first order

Select Yes to apply the condition.

first order

Offering WooCommerce first-order discount is a great way to incentivize your store visitors to make the purchasing decision.

How to Create WooCommerce Bulk Percentage Discount?

Scenario: You want to offer discounts to customers based on the quantity of products they purchase.

Example 1:

  • Buy 3-5 Items: Get a 10% discount
  • Buy 6-10 Items: Get a 15% discount
  • Buy 11+ Items: Get a 20% discount

To create this WooCommerce bulk discount rule, select the Bulk Discount intention from the top.

bulk discount

Let’s say we want to set this discount only during the upcoming Black Friday sale. You can set the date and time from the Valid Between fields.

set date

Input the first value set in the Bulk Rules section. After that, hit the Add More button.

set value

Enter your second quantity values along with the percentage amount.

value set

Finally, insert the last values.

bulk rules

Let’s assume today is Black Friday. This is how your customers will get a discount for 3-5 items.

WooCommerce percentage discount

For 6-10 items, they will get 15% as per your settings.

discount bulk

Lastly, for 11 or more items, here’s how your store will apply the discount.

bulk discount

How to Create Percentage Discount Coupon Code WooCommerce

WooCommerce comes packed with very useful coupon features. You can easily create a WooCommerce percentage discount coupon code using the built-in tool.

Log in to your WordPress Woo site and go to Marketing >> Coupons.

create coupon

Click on the Add Coupon button, and it will take you to the following window.

woocommerce coupon

To create a WooCommerce percentage discount, select the Percentage discount option from the Discount Type dropdown.

WooCommerce percentage discount coupon

Let’s say you want to offer a 15% sitewide WooCommerce percentage discount. Enter your value in the Coupon Amount box.

coupon settings

You can either write a coupon code yourself or use the Generate coupon code button to auto-generate the WooCommerce percentage discount codes.

Let’s try it out in the front end. Add some products to the cart and click the Add a Coupon link on the cart page. This link may appear differently depending on your theme.

add coupon

Enter the coupon code you created and hit apply.

add coupon code

As a result of entering the coupon code, WooCommerce will apply a 15% WooCommerce percentage discount on the cart total.

WooCommerce percentage discount using coupons

Let’s check what other options are available. Using these options, we will create different percentage discount WooCommerce coupons.

Creating a Percentage Discount Coupon on Total Spend

Let’s say you want to offer a 15% discount when the customer adds a minimum $100 worth of items. To achieve this, you need to go to the Usage Restriction tab.

usage restricitons

You need to enter the amount in the Minimum Spend box.

WooCommerce percentage discount on minimum spend

You can also set a maximum spend amount.

set minimum cart value

Save this coupon and check if it is working from the front end. If you refresh the previous cart, it will return the following warning, stating the coupon has been removed because the minimum cart subtotal must be $100.

coupon not applied

Let’s add some products to take it over $100 and then add the coupon again.

WooCommerce percentage discount coupon code

It will reduce the total by 15% and display discount percentage WooCommerce discounted cart total.

WooCommerce percentage discount

Creating a WooCommerce Percentage Discount for Specific Product/Products

There are fields for selecting and excluding products under the Usage Restriction tab.

filter by products

If you want to offer discounts on specific products, you can select the ones from the Products field.

select products

As a result, the coupon will only work when the customer adds the targeted products to the cart.

Creating Percentage Discounts for Categories

You can create categories for organizing your inventory, making your site comfortable for users to navigate. Categories can also be helpful when you create specific ones for new launches, top-rated products, or seasonal catalogs.

You can also create categories to offer particular discounts, such as holiday discounts (Black Friday, Cyber Monday, etc.). You can create percentage discount coupons for any of the Woo site’s categories.

To do so, go back to the Usage Restriction tab. There, you will find fields for selecting and excluding categories.

filter by categories

Search and select the categories from there to create a WooCommerce percentage discount for categories.

In addition, you can set usage limits for your coupons from the Usage Limits tab. This was how you can create percentage discounts using the built-in coupon tool.

usage limits

The biggest drawback of this method is that customers have to collect and manually input the coupon code to avail themselves of the discounts. Moreover, you cannot create advanced conditional discounts using the default tool.

How to Create a WooCommerce Percentage Discount using Custom Codes

We don’t recommend this method unless you are familiar with coding and child themes. In the following sections, we will provide some custom codes that you can copy and paste to set up an automated WooCommerce percentage discount.

In case you are not comfortable with child themes, make a backup of all your files and then proceed. Go to Appearance >> Theme File Editor.

theme file editor

Click on the functions.php file, scroll down to the bottom, and place your codes here.

functions php

Creating a Store-wide WooCommerce Percentage Discount using Codes

Let’s say you want to offer a general 15% discount on the cart total, regardless of the products and categories selected. Here’s the code for it.

function apply_custom_discount() {

if (is_admin() && !defined('DOING_AJAX')) return;

// Set the discount percentage

$discount_percentage = 15;

// Get the cart subtotal

$cart_subtotal = WC()->cart->get_subtotal();

// Calculate the discount amount

$discount_amount = ($cart_subtotal * $discount_percentage) / 100;

// Add the discount

WC()->cart->add_fee(__('WooCommerce Percentage Discount', 'woocommerce'), -$discount_amount);

}

add_action('woocommerce_cart_calculate_fees', 'apply_custom_discount');

Explanation of the Code:

  • The apply_custom_discount function is hooked to woocommerce_cart_calculate_fees, which is executed whenever the cart total is calculated.
  • The is_admin() and !defined(‘DOING_AJAX’) checks ensure that the discount is not applied when in the admin area or during AJAX calls.
  • The discount percentage is set to 15.
  • The cart subtotal is retrieved using WC()->cart->get_subtotal().
  • The discount amount is calculated by taking 15% of the cart subtotal.
  • The discount is applied to the cart as a negative fee using WC()->cart->add_fee.

Paste the code into your funcitons.php file and update it. Now, if you add some products to the cart, WooCommerce will automatically give you a 15% discount on the cart subtotal.

WooCommerce percentage discount using codes

How to Create WooCommerce Percentage Discount for Specific Products Using Custom Codes

Let’s say you want to offer a 15% discount on a single product. First, you need to collect the product ID.

You can easily copy the product ID from the All Products page.

product id

Here’s the code –

function apply_custom_discount_to_specific_product() {

if (is_admin() && !defined('DOING_AJAX')) return;

// Set the product ID and discount percentage

$product_id = 83; // Replace with the specific product ID

$discount_percentage = 15;

// Iterate through the cart items

foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) {

     if ($cart_item['product_id'] == $product_id) {

         // Get the original product price

         $product_price = $cart_item['data']->get_price();

         // Calculate the discount amount

         $discount_amount = ($product_price * $discount_percentage) / 100;

         // Calculate the total discount based on the quantity

         $total_discount = $discount_amount * $cart_item['quantity'];

         // Add the discount as a negative fee

         WC()->cart->add_fee(__('Product Discount', 'woocommerce'), -$total_discount);

         break; // Apply discount to only one product

     }

}

}

add_action('woocommerce_cart_calculate_fees', 'apply_custom_discount_to_specific_product');

When using this code for your own store, make sure you replace the product ID. Even if you add multiple items to the cart, the discount will only be applied to the specific product you selected in the code.

WooCommerce percentage discount on products

Explanation of the Code:

  • The apply_custom_discount_to_specific_product function is hooked to woocommerce_cart_calculate_fees, which is executed whenever the cart total is calculated.
  • The is_admin() and !defined(‘DOING_AJAX’) checks ensure that the discount is not applied when in the admin area or during AJAX calls.
  • The product ID and discount percentage are set.
  • The code iterates through the cart items and checks if the current item matches the specified product ID.
  • If a match is found, it calculates the discount amount based on the product price and quantity.
  • The discount is applied to the cart as a negative fee using WC()->cart->add_fee.

You can also create category-based auto-apply discounts using custom codes, which we covered in our previous article.

How to Show Discount Percentage in WooCommerce

There’s no point in auto-applying discounts without letting the customers know what rewards they earn by shopping at your store. Offering discounts is a marketing strategy to grab more paying customers and grow your sales.

To do so, you need to promote your discounts and coupons on your website as well as your marketing channels (social media, search engines, email, etc.). Let’s add the following banner to a category page to let WooCommerce show percentage discount on category pages.

WooCommerce percentage discount banner

First, upload the image to your WooCommerce site and copy the image URL.

upload image

Copy and paste the following code to funcitons.php. Make sure you replace the image URL.

function display_category_banner() {

if (is_product_category()) {

     // Get the current category

        $category = get_queried_object();

     // Define your banner image URL

     $banner_image_url = 'https://yourwebsite.com/wp-content/uploads/your-banner-image.jpg'; // Replace with your image URL

     // Output the banner image

     echo '<div class="category-banner" style="text-align: center; margin-bottom: 20px;">';

     echo '<img src="' . esc_url($banner_image_url) . '" alt="' . esc_attr($category->name) . '">';

     echo '</div>';

}

}

add_action('woocommerce_before_main_content', 'display_category_banner', 15);

This code will show discount percentage WooCommerce banner in all your category pages in the header section. Jump to any of your category pages now, and you will see the banner in the header.

WooCommerce percentage discount banner

Customers can now see the banner and realize they are getting a discount on their purchases. You can also add CSS codes to style the banner appropriately.

customize stylesheet
.category-banner {

width: 100%;

max-width: 1200px;

margin: 0 auto;

}

.category-banner img {

width: 100%;

height: auto;

}

In addition to banners, you can also add strikethrough discount prices, messages, and badges across your website to inform customers about the WooCommerce percentage discount.

When to Use WooCommerce Percentage Discount?

Here are some prime scenarios where WooCommerce percentage discounts can be a powerful tool for your online store:

Boost Sales and Attract New Customers

  • Store Opening or Launch Sale: Offer a percentage discount to attract new customers and generate excitement about your store launch.
  • Seasonal Promotions: Run percentage discount campaigns during peak shopping seasons like Black Friday, Cyber Monday, or holidays to compete and drive sales.
  • New Product Launch: Incentivize customers to try out a new product by offering a discount on launch.

Clear Out Inventory and Make Room for New Products

  • Slow-Moving Inventory: Encourage sales of products that aren’t selling well by offering a percentage discount. This frees up storage space and improves cash flow.
  • Seasonal Inventory Clearance: Clear out seasonal items at the end of the season with percentage discounts to make room for new inventory.

Targeted Promotions and Customer Engagement

  • Loyalty Programs: Reward your most loyal customers with exclusive percentage discounts to show appreciation and encourage repeat business.
  • Email Marketing Campaigns: Incorporate WooCommerce percentage discount into your email marketing campaigns to incentivize purchases and increase customer engagement.
  • Cart Abandonment Recovery: Win back customers who abandon their carts by offering a percentage discount on their abandoned items.

Competitive Market Strategies

  • Match Competitor Offers: If your competitors are offering discounts, consider implementing similar percentage discounts to stay competitive.
  • Price-Sensitive Customers: Attract customers who are more price-conscious by offering percentage discounts, making your products more appealing. To be honest, almost all customers are price-sensitive.

Remember: While percentage discounts can be a great tool, it’s important to use them strategically. Consider factors like profit margins, discount duration, and target audience to ensure your discounts are effective and don’t erode your profits.

Wrap up

Percentage discounts are a great way to allure new customers to try out your products or to reward loyal customers with category—or member-specific discounts.

We hope our article will help you effectively create and offer a WooCommerce percentage discount in your store.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

6,282,209+ Downloads. 632+ plus 5-star ratings. Promote products on any platform you want.