WooCommerce Discount Percentage allows store owners to grant a discount, based on what the customer purchases. It could be a discount on a product or the customer’s entire cart. When used wisely, the benefits can go from increasing the average customer order to getting rid of unsold inventory. The customers know the higher their purchase is, the higher the discount will be. It also nudges your target audience to make their first purchase, therefore increasing your clientele. 

In this guide, you will learn how to create different types of woocommerce discount percentages on your woocommerce store.

What are woocommerce discount percentages?

WooCommerce percentage discounts refer to a type of promotional offer or discount applied to products in a WooCommerce-powered online store. Percentage discounts are a way to reduce the price of a product by a certain percentage, making it more appealing to customers and potentially increasing sales. This is a common strategy used by businesses to attract customers, clear out excess inventory, promote new products, or reward loyal customers.

Here’s how WooCommerce percentage discounts work:

  • Discount Calculation: A percentage discount is calculated based on the original price of a product. For example, if a product originally costs $100 and a 20% discount is applied, the discounted price would be $80 (20% of $100).
  • Displaying Discounts: The discounted price is typically displayed on the product page alongside the original price. This helps customers see the value they’re getting and encourages them to make a purchase.
  • Cart and Checkout: When customers add a discounted product to their shopping cart, the discounted price is reflected in the cart total and carried through to the checkout process.
  • Coupon Codes: WooCommerce allows you to set up percentage discounts using coupon codes. Customers enter these codes during the checkout process to apply the discount to their purchases. For example, a coupon code could provide a 15% discount on all products in a specific category.
  • Conditions and Restrictions: WooCommerce gives you the flexibility to set conditions and restrictions for your percentage discounts. For instance, you can limit the discount to specific products, product categories, user roles, minimum purchase amounts, and more.
  • Time-Limited Offers: You can create time-limited percentage discount offers to create a sense of urgency and encourage quick purchases. For example, you might run a weekend sale with a 25% discount on select products.
  • Marketing and Promotion: Promote your percentage discounts through email marketing, social media, banners on your website, and other channels to attract attention and drive traffic to your store.

 The importance of offering woocommerce discount percentages?

Offering percentage discounts in WooCommerce can be a powerful strategy to achieve various business goals and benefits. Here are some reasons why you might consider offering percentage discounts in your WooCommerce store:

  • Attract New Customers: Percentage discounts can attract new customers to your store, especially if they’re looking for deals and bargains. A well-promoted discount can help increase your store’s visibility and bring in new visitors.
  • Boost Sales: Discounts can encourage hesitant customers to make a purchase, as they perceive added value in getting a product for a lower price. This can lead to increased conversion rates and overall sales.
  • Clear Excess Inventory: If you have products that are overstocked or nearing the end of their lifecycle, offering percentage discounts can help clear out inventory quickly.
  • Promote New Products: When you introduce new products to your store, offering a launch discount can generate buzz and encourage customers to try out the new items.
  • Reward Loyal Customers: Percentage discounts are a way to show appreciation to your existing customers. Loyalty discounts can foster customer retention and repeat business.
  • Increase Average Order Value: By setting up discounts that apply when customers reach a certain spending threshold, you can motivate them to add more items to their cart to qualify for the discount. This can increase your average order value.
  • Create Urgency: Time-limited discounts create a sense of urgency, prompting customers to purchase before the offer expires. This can help expedite decision-making.
  • Compete in the Market: If your competitors are offering discounts, you may need to do the same to remain competitive and not lose customers to other stores.
  • Marketing Campaigns: Discounts can be incorporated into your marketing campaigns, such as holiday promotions, seasonal sales, or special events.
  • Capture Abandoned Carts: If a customer has added items to their cart but hasn’t completed the purchase, sending them a reminder email with a discount can entice them to finalize their order.
  • Cross-selling and Upselling: Discounts can be used strategically to encourage customers to purchase complementary or higher-priced items. For example, you can offer a discount on a related product when a certain product is added to the cart.
  • Increase Website Traffic: Promoting percentage discounts through various channels, like social media or email marketing, can drive more traffic to your website.

When implementing percentage discounts, it’s important to consider your profit margins, the goals of the discount campaign, and the overall impact on your business. While discounts can be beneficial, they should be used thoughtfully and strategically to align with your business objectives. Additionally, consider using WooCommerce’s built-in discount features or third-party plugins to manage and track your discount campaigns effectively.

Types of woocommerce discount percentages?

There are different types of scenarios you can create when offering a woocommerce discount percentage on your online store. Here are a few examples below.

Woocommerce Percentage Discount


Percentage discount based on customer billing country

5% off product price if customer buying from China

Percentage discount based on previous customer orders

10% off product price on the second order of a customer

Percentage discount based on shipping methods

5% off product price if the product shipped using DHL

Percentage discount based on groups

20% off product price for Gold members

Percentage discount based on order counts

15% off product price on the first-year subscription

Percentage discount based on product

15% off product A

Percentage discount based on cart total

5% off every order above 50$

These are a few woocommerce percentage discount types you can create on your online store.

3 methods to Offer WooCommerce Discount Percentages

There are 3 methods to offer WooCommerce Discount Percentages on your online store: 

  1. Using coupons
  2. Using a Woocommerce discount plugin
  3. Using the programming language – PHP: This is mainly for Web developers but you can also try it out 

How to offer WooCommerce Discount Percentages using coupons?

We already have a well-curated article about how to create a WooCommerce percentage discount using coupons. This step-by-step tutorial will help you set up your discount.

How to offer WooCommerce Discount Percentages using a Discount Plugin? 

There are lots of discount plugins, but very few are simple to use and efficient. In this tutorial, we will be using the ‘Conditional Discounts for WooCommerce’ plugin. This is a Discount plugin that is impeccable for all types of discounts; percentage discounts, BOGO, fixed amounts discounts, bulk discounts, wholesale discounts, etc. 

It automatically applies discounts to customers that meet the criteria defined by the store owner. It has a free version that is perfect for what we are about to do! 

Steps to Follow:

  • Offering percentage discounts On specific products
  1. The very first step is to download and install the free version of the plugin here.
  2. Then let’s create a woocommerce product list that will contain all the products to which the discount will be applied. 
  3. Once it’s done, kindly go to Discounts > New discount to access the discounts creation page: 

new discount percentage

4. Please enter a discount name

5. Select “Percentage off product price” in the Action field

6. Enter your discount percentage in the “Percentage / Fixed amount” field

7. Click on the Publish button to push your discount live.

8. If you want to add conditions to the application of the discount, kindly click on the “Add rules group’ button and set your terms according to your needs.

  • Offering a percentage discount on the cart total

Simply follow the previous steps but select “Percentage off order subtotal” instead of “Percentage off product price” in the  “Action” field to apply a percentage discount off the order. That way, instead of applying the discount on a specific set of products, it will be applied to the entire cart.

discount percentage

How to offer a Woocommerce Discount Percentage using PHP?

PHP is the programming language that both Woocommerce and WordPress are built on. In this section, we will be explaining how you can set up a percentage discount by writing a piece of code.

I will strongly advise that if you do not have coding experience, you might want to ask for assistance.

Before you set up a percentage discount on a woocommerce product using a coding language, you need to understand the actions, filters, and hooks. Actions and filters are two different types of hooks that allow you to run PHP custom codes at a specific point in the execution of WordPress Core, plugins, and themes. 

WooCommerce as a WordPress plugin includes many hooks that allow you to alter its default behavior from your plugin or your theme.

  • Offering percentage discount On specific products

Offering percentage discounts on specific products can be an effective strategy to drive sales and attract attention to certain items in your WooCommerce store. By strategically applying percentage discounts, you can incentivize customers to make purchases while also promoting specific products.

We have two types of products; we have simple products and variable products. Simple products refer to products with no variations or options while variable products have different options and variations, which could differ in prices. A good example of a variable product is a T-shirt, which is available in different sizes and colors. 

For offering percentage discounts on simple products, we’ll use two filters: 

  • woocommerce_product_get_price and 
  • woocommerce_product_get_sale_price.

add_filter( ‘woocommerce_product_get_price’, ‘get_product_sale_price’, 10, 2 );

add_filter( ‘woocommerce_product_get_sale_price’, ‘get_product_sale_price’, 10, 2 );

function get_product_sale_price( $sale_price, $product) {

    //This function will go through every product displayed on the page when the code runs

    //so we need to make sure to apply the discount on the product we need which ID is $product_to_discount_id



    //We retrieve ID of the product that is being evaluated

    $product_id = $product->get_id();

    //If it’s the product we want to discount

    if ( $product_id == $product_to_discount_id ) {

        $percentenge_amount = $percentage/100;

        $sale_price = (float) $sale_price;

        //we apply the discount percentage and calculate the new price

        $sale_price = $sale_price – ( $sale_price * $percentenge_amount );


    return $sale_price;


For variable products, we’ll use two other filters different from the ones used for simple products: 

  • woocommerce_product_variation_get_sale_price and
  • woocommerce_product_variation_get_price.

add_filter( ‘woocommerce_product_variation_get_sale_price’, ‘get_product_sale_price’, 10, 2 ); 

add_filter( ‘woocommerce_product_variation_get_price’, ‘get_product_sale_price’, 10, 2 ); 

function get_product_sale_price( $sale_price, $product) {

    //This function will go through every product displayed on the page when the code runs

    //so we need to make sure to apply the discount on the product we need which ID is $product_to_discount_id



    //We retrieve ID of the product that is being evaluated

    $product_id  = $product->get_id();

    //If it’s the product we want to discount

    if ( $product_id == $product_to_discount_id ) {

        $percentenge_amount = $percentage/100;

        $sale_price  = (float) $sale_price;

        //we apply the discount percentage and calculate the new price

        $sale_price  = $sale_price – ( $sale_price * $percentenge_amount );


    return $sale_price;


  • Offering percentage discount On the cart total

Just like earlier, we’ll use WooCommerce hooks to apply our percentage discounts on the woocommerce cart. If you jumped directly to this section, kindly learn about actions, filters, and hooks here, as it’s important to what we are about to do.

//We’ll use the “woocommerce_cart_calculate_fees” action to create our discount

add_action( ‘woocommerce_cart_calculate_fees’, ‘add_order_discount’ );

function add_order_discount() {

    $percentage = 20;

    $discount_amount = (float) $percentage/100;

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

    $fee = array(

    ‘name’ => __( ‘Discount on cart’ ),

    ‘amount’ => (float) – 1 * $order_subtotal * $discount_amount,


    wc()->cart->fees_api()->add_fee( $fee );


From the insights shared in this article, it’s clear that finding the sweet spot for discount percentages involves a delicate balance. Strategic considerations like product margins, customer psychology, and market trends must all harmonize to create compelling offers that resonate with your target audience.