Add A 20% Discount in WooCommerce

How Do I Add A 20% Discount in WooCommerce?

Did you know, 56% (67% in the US) of customers prefer percentage discounts over any discounts?

Not only that, but percentage discounts motivate 80% of consumers to complete the purchase, and seasonal sales witness a 25% spike in conversion rates when offered such discounts.

A 20% discount strikes the perfect balance—it’s substantial enough to grab attention without gutting profits. Imagine turning hesitant shoppers into eager buyers: WooCommerce lets you deploy this sweet spot effortlessly.

The result? A frictionless way to clear inventory, reward loyalty, or dominate seasonal sales—no guesswork required.

Now, you might be thinking, how do I add a 20% discount in WooCommerce?

To add a 20% discount in WooCommerce, use the Disco plugin to create automated dynamic rules (e.g., 20% off specific categories). Alternatively, you can apply a coupon code (set to percentage discount in settings), or add a custom PHP snippet to automate percentage-based price adjustments. All methods let you exclude products and schedule sales.

Below, I’ll walk you through setting up a 20% discount using plugins, coupons, and custom code—no fluff, just actionable steps tailored for store owners.

How Do I Add A 20% Discount in WooCommerce?

As mentioned above, you have 3 choices for setting percentage-based discounts WooCommerce.

  1. Using a Dynamic Discount Plugin – To apply discounts automatically.
  2. Using the Built-in Coupon Tool – Customer needs to manually apply the coupon to get the discount.
  3. Using Custom Codes – Flexible solution, but comes with its risks and requires skills.

If you are split between your choices on how do I add a 20% discount in WooCommerce, let me tell you, WooCommerce discount plugins are by far the best solution. You can effortlessly create discount rules for WooCommerce within a few clicks, and the plugin will do the rest automatically.

My personal choice for a discount plugin is Disco. I picked this one because it’s absolutely free and packs all the muscles you will only find on a premium plugin.

Disco will make you feel like having a discount wizard in your back pocket. You can slap a 20% discount on specific categories, target VIP members, or even reward cart totals over certain amounts—all without touching code.

The killer feature? Condition filters let you layer rules like “20% off summer dresses for specific user roles” or “on specific cart conditions.” I’ve used it myself to automate Black Friday sales in minutes.

Disco conditions

Let us walk you through how to add a 20% discount in WooCommerce using the plugin.

  • Example Scenario: “Offer 20% Off on All Products”

Step 1: Install the Free Discount Plugin Disco

  • Navigate to Plugins >> Add New from the WordPress admin panel.
  • Search for Disco.
  • Click the Install button and then Activate.
Install Disco

Step 2: Create a 20% Discount Campaign

To create an automated percentage discounts WooCommerce rule,

  • Go to the Disco dashboard from the left menu panel.
How do I add a 20% discount in WooCommerce
  • Click on the Create a Discount button.
  • Input a name for your discount rule (e.g. 20% Off All).

Step 3: Configure Discount Rule Settings

Product intent
  • Select the Product discount intent.
  • From the Discount section, select the All Products option.
All Products
  • Select the Percentage Discount option from the Discount Type dropdown.
  • Insert 20 in the Discount Value box.
Percentage discount

Optional: You can also schedule discounts in WooCommerce from the Valid Between calendar fields.

Step 4: Save and Test the Discount

  • Click the Save button to publish the coupon.
  • Disco will immediately start displaying the discounted amounts on the storefront automatically.
How do I add a 20% discount in WooCommerce

This was your answer to how do I add a 20% discount in WooCommerce.

5 Advanced 20% Discount Strategies to Skyrocket Sales (Beyond Basic Rules)

A flat 20% off on all products is a good starting point. However, to unlock the full power of percentage discounts in WooCommerce, you need strategies that target the right customers at the right time—without gutting your margins.

Advanced rules let you reward loyal shoppers, clear slow-moving inventory, or even nudge big spenders to buy more. Think of it like fishing with a spear instead of a net: precise, profitable, and packed with urgency.

Let’s explore some advanced WooCommerce discount percentage strategies.

1. Flash Sale Frenzy (Time-Limited 20% Off)

What: Create urgency with a flash sale 20% discount that disappears like Cinderella’s carriage at midnight.

  • Example: “24-Hour Flash Sale: 20% Off Everything – Ends Tonight!”

Why Use This?

  • Scarcity Wins: Fear of missing out (FOMO) pushes shoppers to act fast.
  • Clear Inventory: Perfect for dumping slow-moving stock before new collections drop.
  • Traffic Spike: Use social media teasers to drive last-minute traffic.

How Do I Add A 20% Discount in WooCommerce for Limited Time?

To set sale prices in WooCommerce for a limited time, follow these steps. Note: We are creating the above-mentioned example using Disco.

  • Create a new rule and select the Product intent.
time limited discount
  • Select All Products from the Discount section.
  • Select and set the start date and time from the first Valid Between calendar field.
set start time
  • Set the end time and date similarly.
end time
  • Enter the discount percentage.
How do I add a 20% discount in WooCommerce
  • Save the rule to enable it. Disco will automatically enable and deactivate the discount as per your set time.

2. Category-Specific Discounts

What: Target specific product categories (like “Summer Collection” or “Gadgets”) with a 20% discount.

  • Example: “20% Off All ‘Summer Collection’ Items!”

Why Use This?

  • Boost Niche Sales: Highlight underperforming categories without a storewide sale.
  • Exclude Sale Items: Protect margins by skipping already discounted products.
  • Cross-Sell: Pair with a “Customers also bought” section to upsell related items.

How Do I Add A 20% Discount in WooCommerce for Specific Categories?

The discount rules for WooCommerce free plugin Disco make creating a category-based discount a breeze. This time, we will use a condition filter.

  • Select Product discount intent.
  • Specify your target products or select all to offer the discount on all products under that category.
product rule
  • Set the percentage value.
  • Click the Add Condition button.
add condition
  • Select the Categories filter.
set filter
  • Search and select the category ‘Summer Collection.’
add condition
  • Save and test the rule from the front.
How do I add a 20% discount in WooCommerce

3. Cart Total Triggers

What: Reward bigger spenders with a 20% discount when their cart hits a threshold. Cart conditional discounts are incredibly appealing as they incentivize customers to add more items to qualify.

  • Example: “Spend $150, Unlock 20% Off Your Entire Order!”

Why Use This?

  • Increase AOV: Customers add more items to hit the discount threshold.
  • Psychological Nudge: “I’m already at $130… let me grab one more thing!”
  • Repeat Buyers: Regulars learn to bulk-purchase to maximize savings.

How do I Add A 20% Discount in WooCommerce Based On Cart Condition?

Disco offers several cart-based condition filters to offer WooCommerce cart discounts. For the above example, we will need the Cart Subtotal condition.

  • After creating a new rule, select the Cart discount intent.
  • Specify your products and validity time.
cart discount
  • Set the percentage value.
  • Add the condition Cart Subtotal.
set condition
  • Select the Greater Than Or Equal operator and set the value.
set filter
  • Save and test the rule by adding $150 or more worth of products.
How do I add a 20% discount in WooCommerce

4. Role-Based Discounts (VIP Treatment)

What: Offer 20% off exclusively to loyal customers, email subscribers, or registered tier members.

  • Example: “Gold Members Only: 20% Off Selected Products – Just for You!”

Why Use This?

  • Build Loyalty: Make customers feel special (and keep them coming back).
  • Grow Your List: Gate the discount behind email signups or membership.
  • Avoid Abuse: Restrict to logged-in users to prevent coupon sharing.

How do I add a 20% discount in WooCommerce for Specific User Roles?

The discount rules and dynamic pricing for WooCommerce plugin Disco allow you to set up user role discounts in its free version, a significant feature typically found only in paid plugins.

Here’s how you can create such discount rules.

  • Select Product intent and select the Few Products option.
few products
  • Search and select your target products.
select products
  • Set the percentage value.
  • Add the condition User Role.
  • Select and set the target user role.
How do I add a 20% discount in WooCommerce
  • Save the rule; only Gold members can view and enjoy the discount.

5. BOGO Magic (Buy One, Get 20% Off Another)

What: BOGO deals are one of the most popular discount types. Hook customers with a “Buy 1, Get 20% Off a Second Item” deal.

  • Example: “Buy a Keyboard, Get 20% Off a Mouse!”

Why Use This?

  • Encourage Bundles: Pair complementary products to boost order size.
  • Flexible Pairing: Let customers choose their second item (no rigid rules).
  • Clear Old Stock: Use BOGO to shift leftover inventory creatively.

How to Offer a BOGO Percentage Discount in WooCommerce?

We must mention that BOGO is a paid option and only available on Disco Pro. Here are the steps –

  • Select the BOGO option from the top.
BOGO deal
  • Click the Few Products option and select your target keyboard product.
  • Select the Buy X Get Y option from the BOGO type.
select type
  • Set 1 as the value of Get Quantity and Minimum Quantity.
  • Search and select the product you are offering at 20% off.
How do I add a 20% discount in WooCommerce
  • Set the percentage value in the Discount Value box.
  • Save and test the rule from the front.

How to Add a 20% Discount in WooCommerce Using the Coupon Tool?

A coupon-based 20% discount is ideal for controlled promotions—like rewarding email subscribers or running limited-time offers. Unlike automatic discounts, coupons require customers to enter a code at checkout. This gives you flexibility to track redemptions and adjust campaigns.

Follow these WooCommerce coupon code setup steps to create a percentage-based coupon:

Step 1: Access the Coupon Dashboard

  • Log in to your WordPress admin panel.
  • Navigate to Marketing >> Coupons (left-side menu).
  • Click Add New to create a coupon.
add coupon

Step 2: Configure General Coupon Settings

set coupon
  • Coupon Code: Enter a unique code (e.g., SUMMER20). Avoid spaces or symbols.
  • Description: Briefly explain the coupon (e.g., “20% off sitewide for summer sale”).
  • Discount Type: Select “Percentage discount” from the dropdown menu.
  • Coupon Amount: Type 20 (this sets the 20% discount value).

Step 3: Set Usage Restrictions

Control who can use the coupon and where it applies:

Usage Limits:

usage limits
  • Usage limit per coupon: Limit total redemptions (e.g., 100 uses).
  • Usage limit per user: Restrict how often one customer can apply it (e.g., 1 use).

Product Restrictions:

user restrictions
  • Products: Select specific products if the discount applies only to certain items.
  • Exclude products from Discount WooCommerce Sale: Prevent the coupon from working on sale or excluded items.

User Restrictions:

  • Allowed Emails: Enter customer emails to set the WooCommerce coupon for specific user.

Step 4: Schedule Expiry Dates (Optional)

  • Under Coupon expiry date, use the calendar to set an end date (e.g., after a 7-day sale).
  • This creates urgency and prevents indefinite use.

Step 5: Save and Publish

  • Click Publish to activate the coupon.
How do I add a 20% discount in WooCommerce
  • Test the coupon: Open your store, add a product to the cart, and apply the code SUMMER20 at checkout to confirm the 20% discount works.
How do I add a 20% discount in WooCommerce

This is how to add coupon code in WooCommerce, specifically a percentage off one.

How Do I Add a 20% Discount in WooCommerce Using Custom Codes?

We highly discourage this method if you are not tech-savvy or have coding skills. Inserting a tiny wrong code can shatter your entire site. Therefore, use with caution.

Here are the steps to add a 20% discount on all products using codes.

Step 1: Backup Your Files

  • Backup your entire store site using plugins like Duplicator, UpdraftPlus, or BackWPup.

Step 2: Access Theme File

We highly recommend using a child theme. However, if you are not familiar with child themes, you can directly access the theme file, but you need to update the code on every theme update.

  • Go to Appearance >> Theme File Editor.
  • Click the functions.php.
custom code

Note: For WordPress built-in themes, the Theme File Editor is placed under the Tools menu.

Step 3: Insert the 20% Off Code

  • Scroll to the bottom of functions.php and insert the following code.
function apply_custom_discount() {

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

// Set the discount percentage

$discount_percentage = 20;

// 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');

How the Code Works

This code automatically applies a 20% discount to the WooCommerce cart total on the front end. It hooks into the cart calculation process, retrieves the subtotal, calculates the discount amount, and adds it as a negative fee.

Step 4: Save and Test

  • Update the functions.php.
  • Add any product to the cart on the front, and it will automatically apply the discount.
How do I add a 20% discount in WooCommerce

Advanced Tips for Managing 20% Discounts

Let’s discuss some best practices for offering 20% off discounts.

Strategic Discount Layering

  • Consider offering additional small discounts to specific customer segments (e.g., VIPs, repeat buyers).
  • Exercise caution to avoid excessive margin reduction.

Mastering Discount Timing & Promotion

  • Implement flash sales with clear time limits to create urgency.
  • Announce discounts with engaging and attention-grabbing messaging.
  • Utilize countdown timers and prominent banners to highlight limited-time offers.

Contextualizing Your 20% Off

  • Tie the discount to specific events (e.g., product launches, anniversaries).
  • Use discounts to drive specific goals (e.g., clearing out old inventory).
  • Craft compelling narratives around your promotions.

Personalized Discount Approaches

  • Offer new subscribers a standard welcome discount.
  • Implement targeted discounts for cart abandoners to encourage completion.
  • Segment your audience for more relevant and effective offers.

Data-Driven Discount Decisions

  • Track product performance during discount periods.
  • Analyze which marketing channels attract discount-driven customers.
  • Use data insights to refine future discount strategies.

Long-Term Discount Vision

  • Avoid creating a customer expectation of constant deep discounts.
  • Balance percentage discounts with other value-added offers (e.g., bundles, free shipping).
  • Focus on building overall customer loyalty.

The Power of Experimentation

  • A/B test different discount messaging and durations.
  • Experiment with various discount combinations and targeting.
  • Continuously analyze results to optimize your discount strategy.

Wrap up

Adding a 20% discount in WooCommerce is straightforward once you know your tools. Whether you choose coupons for controlled promotions, custom code for more flexibility, or plugins like Disco for automated dynamic rules, each method serves a unique purpose.

Always test discounts in a staging environment first, exclude high-risk products, and set expiration dates to maintain urgency. With these strategies, you’ll not only answer “How do I add a 20% discount in WooCommerce?” but also master the art of driving sales without sacrificing profits.

Start experimenting today—your next big revenue spike could be one discount away.

Leave a Comment

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

Scroll to Top