WooCommerce Guides February 11, 2025 16 min read

WooCommerce Conditional Shipping and Payments: Hide Methods Based on Cart, Product & Location

WooCommerce Conditional Shipping and Payments: Hide Methods Based on Cart, Product & Location

Quick answer: WooCommerce only offers basic controls here, such as shipping zones and a few gateway options, so rule-based hiding needs a plugin. With conditional shipping and conditional payment gateway rules you can hide free shipping when a heavy item is in the cart, show a courier only in one country, or disable Cash on Delivery for virtual products. The scenarios and setup steps below show how to build each rule.

You’ve set up free shipping. You’ve connected PayPal and bank transfer. You’ve added local pickup.

But now every customer.. regardless of where they are, what they’re buying, or how much they’re spending.. sees every single option at checkout. That’s not flexibility. That’s chaos.

WooCommerce conditional shipping and payments solve exactly this problem. Instead of showing a flat list of options to everyone, you create rules: show this method only when these conditions are met, hide that gateway unless the cart meets this threshold.

The result is a checkout that feels tailored.. and a store that runs more efficiently behind the scenes.

Quick Answer: WooCommerce Conditional Shipping & Payments

WooCommerce conditional shipping and payments let you show or hide shipping methods and payment gateways based on rules you define. Instead of offering every option to every customer, you control exactly what appears at checkout depending on cart contents, order total, customer location, product type, or user role.

  • Cart total rules → Show free shipping only when the order exceeds a set amount
  • Location rules → Restrict DHL Express to specific countries or cities
  • Product rules → Disable express shipping when heavy or fragile items are in the cart
  • Payment gateway rules → Hide cash on delivery for international orders
  • User role rules → Unlock wholesale shipping rates for registered B2B customers

Keep reading for a full decision table, real-scenario walkthroughs, and a step-by-step setup guide using WPFactory’s plugin.

Note: This guide covers how to set up conditional shipping and payment rules in WooCommerce using WPFactory’s Conditional Shipping plugin – WPFactory’s plugin offers a focused, affordable alternative for rule-based shipping and payment control directly from your WordPress dashboard.

The Conditional Logic Decision Table: Which Rule Do You Need?

Before diving into setup, use this table to identify what type of condition matches your store’s situation.

This is also the fastest way to understand the full scope of what WooCommerce conditional shipping and payments can do.

Condition Type Trigger Example Shipping / Payment Affected Use Case
Cart Total Order exceeds $50 Show: Free Shipping Encourage larger orders
Cart Total Order exceeds £500 Require: Bank Transfer Reduce payment risk on high-value orders
Customer Location Shipping country is Germany Show: DHL Express only Offer region-specific carriers
Customer Location Outside home city Hide: Local Pickup Prevent impossible pickup selections
Product in Cart Heavy/oversized item present Hide: Express Shipping Avoid carrier rejection of heavy parcels
Product in Cart Virtual/downloadable product only Hide: All physical shipping + COD Clean up checkout for digital products
Payment Gateway Customer selects Klarna Unlock: Free Shipping Incentivize preferred payment methods
User Role Customer is a Wholesale buyer Show: Freight / Pallet shipping Separate B2B and B2C checkout flows
Date / Time Order placed before 2pm on weekday Show: Same-Day Delivery Match courier dispatch cut-off times

Found your scenario? The sections below walk through the most common ones with exact setup steps.

If your use case involves a combination of conditions.. for example, free shipping only for wholesalers in Germany spending over €200 the AND/OR logic operator covered later in this guide handles that too.

Real Scenarios: How Store Owners Actually Use Conditional Shipping Rules

The best way to understand WooCommerce conditional shipping and payments is to see them solving real problems.. not abstract examples, but situations store owners encounter every week.

Scenario 1: Hide Free Shipping When a Heavy Item Is in the Cart

You sell home goods. Most orders qualify for free shipping, but when a customer adds a heavy piece of furniture or a large appliance, free shipping becomes a money-losing proposition.

You need free shipping to disappear the moment that item enters the cart.

Setup using WPFactory’s Conditional Shipping plugin:

  1. Go to WPFactory > Conditional Shipping > Product tab
  2. Enable the “Exclude Products” condition
  3. In front of the Free Shipping row, enter the product name or ID of your heavy item (e.g., “Dining Table – Oak”)
  4. Set the logical operator to OR if you want this to apply when any one of several heavy items is present
  5. Save changes

Result: The moment that product enters the cart, free shipping vanishes. Customers still see flat rate and other available methods.. the checkout doesn’t break, it just adapts.

WooCommerce Conditional Shipping method by product

Scenario 2: Show DHL Only for Customers in Germany

You’ve negotiated a special DHL rate for German deliveries. Showing that option to customers in France, Poland, or the UK creates confusion and support tickets. You want DHL to appear exclusively for German shipping addresses.

Setup:

  1. Go to WPFactory > Conditional Shipping > Cities tab
  2. Enable the “Require Cities” condition
  3. In front of the DHL / Flat Rate row tied to your DHL method, enter Germany (DE)
  4. Save changes

Result: DHL only appears when the customer’s shipping country is Germany. Every other country sees your standard shipping options. No code required, no theme edits — just a dropdown and a save click.

WooCommerce Conditional Shipping method by location

Scenario 3: Require Bank Transfer for Orders Over £500

High-value orders carry financial risk. Chargebacks on £800 orders hurt.

You want customers spending over £500 to pay by bank transfer.. removing card payment options at that threshold forces the conversation to a more secure channel.

Setup:

  1. Go to WPFactory > Conditional Shipping > Order Amount tab
  2. Enable “Minimum Order Amount” for the Payment Gateway condition
  3. Set the minimum to 500 for the BACS (Bank Transfer) gateway
  4. Then go to the Payment Gateway tab and use “Exclude Payment Gateways“ to hide card payments above that threshold
  5. Save changes

Result: Below £500, customers see all payment options. Above £500, bank transfer becomes the only available path. This is a common pattern for B2B stores and high-ticket retailers.

Scenario 4: Disable Cash on Delivery for Virtual Products

You sell a mix of physical and digital products. When someone purchases only a downloadable plugin, an ebook, or a software license, cash on delivery makes zero sense — there’s nothing to deliver. Yet WooCommerce shows it anyway, creating customer confusion and occasional disputes.

Setup:

  1. Go to WPFactory > Conditional Shipping > Product tab
  2. Enable the “Require Products” condition under Payment Gateways
  3. For the COD gateway, list only your physical products.. or use the Category tab to target the “Virtual” or “Downloadable” category and set it to exclude COD
  4. Save changes

Result: Customers buying only digital products see a clean checkout without COD. Mixed carts (physical + digital) continue working normally. This eliminates a persistent source of checkout confusion with zero ongoing maintenance.

Scenario 5: Unlock Free Shipping When Klarna Is Selected

You have a partnership arrangement with Klarna.. they subsidize part of your shipping cost when customers use their buy-now-pay-later service. You want to pass that benefit to customers: choose Klarna, get free shipping.

Setup:

  1. Go to WPFactory > Conditional Shipping > Payment Gateway tab
  2. Enable “Require Payment Gateways”
  3. In front of the Free Shipping row, enter Klarna (or the gateway ID used in your WooCommerce setup)
  4. Save changes

Result: Free shipping only appears when Klarna is selected as the payment method. Customers discover this as they explore checkout options.. a subtle but effective nudge toward your preferred payment gateway.

WooCommerce Conditional Shipping method by payment Gateways

🔌 Set Up These Rules in Minutes with WPFactory’s Plugin

All five scenarios above, and dozens more.. are handled by WPFactory’s Conditional Shipping for WooCommerce plugin. No coding required. Configure rules from your WordPress dashboard, test in real-time, and adjust whenever your store’s needs change.

Get Conditional Shipping for WooCommerce →

Setup guide: Conditional Shipping by Product walks through the settings step by step.

woocommerce conditional shipping and payments plugin

How to Set Up WooCommerce Conditional Shipping and Payments: Step-by-Step

Once you understand which rules you need (the table above helps), the setup process is straightforward. Here’s how to get WPFactory’s Conditional Shipping plugin running from scratch.

Step 1: Install and Activate the Plugin

  1. Get Conditional Shipping for WooCommerce from WPFactory
  2. Download the ZIP file from your account
  3. In WordPress, go to Plugins > Add New > Upload Plugin
  4. Upload the ZIP, click Install Now, then Activate

upload woocommerce conditional shipping and payments plugin

Step 2: Enable the Plugin

  1. Navigate to WPFactory > Conditional Shipping in your dashboard
  2. Open the General tab
  3. Check the “Enable Plugin” box
  4. Save changes

Enable the woocommerce conditional shipping and payments plugin

Step 3: Set Your Logical Operator

This is the most important setting most store owners overlook. The logical operator controls how multiple conditions interact:

  • AND: All conditions must be true for the rule to apply. Example – free shipping only if the order is over $50 AND the customer is in New York.
  • OR: Any one condition being true triggers the rule. Example – hide express shipping if the cart contains a fragile item OR if the destination is overseas.

Choose based on your rule’s intent. You can return and change this as you add more conditions.

Adjust Settings for woocommerce conditional shipping and payments plugin

Step 4: Configure Your Conditions

The General tab shows all available condition types. Enable only the ones relevant to your rules.

WooCommerce shipping - Step3(3)

Each enabled condition gets its own sub-tab where you configure the specifics: which shipping methods are affected, which products or categories trigger the rule, which countries or cities apply, and what thresholds activate the condition.

Work through each tab methodically. For each shipping method row, enter the value that triggers the condition. Leave a row blank to leave that method unaffected.

Step 5: Test Before Going Live

Use WooCommerce’s built-in order simulation or log in as a test customer to verify each rule.

Add the products that should trigger conditions, select the relevant shipping address, and confirm that only the expected methods and gateways appear. Test edge cases.. mixed carts, addresses near geo-boundaries, orders right at your cart total thresholds.

Advanced Conditions: User Roles, Memberships, and Date/Time

Beyond the core cart and location rules, WooCommerce conditional shipping and payments become significantly more powerful when you layer in customer-level conditions.

User Role-Based Shipping

If you run a store that serves both retail and wholesale customers, user role conditions let you split the checkout experience entirely. Wholesale customers see freight and pallet shipping options that retail customers never encounter.

Retail customers see standard courier options that B2B buyers would never want for a 200-unit order. Both groups get a checkout that feels built for them.. because it is.

Setup: Go to WPFactory > Conditional Shipping > User Roles tab, enable the condition, and assign shipping methods to specific roles. Wholesale, Subscriber, Customer.. each role can have its own set of visible methods.

WooCommerce Conditional Shipping method by user roles

Date and Time Conditions

Same-day delivery only makes sense if the order arrives before your courier’s daily cut-off.

With date/time conditions, you can show same-day delivery only during working hours on weekdays, and automatically hide it on evenings, weekends, and holidays.

This prevents customers from selecting an option your logistics can’t fulfill, and eliminates the manual work of toggling methods on and off yourself.

Setup: Go to WPFactory > Conditional Shipping > Date/Time tab, define the time window, and assign it to the relevant shipping method.

WPFactory vs the Official WooCommerce Extension: A Quick Comparison

Because “conditional shipping and payments” is also the name of an official WooCommerce.com extension, it’s worth being clear about how the two differ. Both solve similar problems, but they approach them differently.

Feature WPFactory Conditional Shipping WooCommerce Official Extension
Pricing Affordable one-time or annual fee Higher annual subscription
Setup location WPFactory menu in WP dashboard WooCommerce > Settings
Condition types Cart total, location, product, user role, date/time, payment gateway Cart total, location, product, shipping class
User role conditions ✅ Yes ❌ Limited
Date/Time conditions ✅ Yes ❌ Not natively
AND / OR logic ✅ Configurable per ruleset ✅ Yes
Support WPFactory support forum + docs WooCommerce.com support

If you’re already using other WPFactory plugins.. for order quantity limits, cost of goods tracking, or VAT management.. WPFactory’s Conditional Shipping integrates naturally into the same dashboard environment you’re already working in.

Shipping Rule Condition Checker

Not sure which condition type applies to your situation? Use this quick tool to identify the right setup path.

🔧 Which Conditional Rule Do You Need?



Common Mistakes When Setting Up Conditional Shipping Rules

Most configuration problems with WooCommerce conditional shipping and payments come down to a handful of recurring errors. Knowing these in advance saves hours of troubleshooting.

1. Using AND When You Need OR (or Vice Versa)

The logical operator applies to your entire ruleset, not individual conditions. If you set AND and have three conditions configured, all three must be true simultaneously for any rule to trigger.

This is correct for narrow, highly specific rules. It breaks everything if you intended any one of several conditions to activate the rule.. that’s what OR is for.

2. Forgetting to Enable the Condition

Each condition type has its own “Enable Condition” checkbox. Adding values without checking that box means the condition is saved but never evaluated. Always verify the checkbox is ticked before testing.

3. Testing With an Admin Account

WooCommerce sometimes bypasses shipping and payment rules for admin-level users.

Always test conditional rules by logging in as a regular Customer-role account, or by using WooCommerce’s order simulation mode. Testing as admin and seeing all methods appear does not mean the rules aren’t working.

4. Not Accounting for Shipping Zones

Conditional shipping rules work on top of your shipping zone configuration.. they don’t replace it. If a shipping method isn’t assigned to a zone that covers the customer’s address, the conditional rule for that method will never fire.

Make sure your shipping zones are set up correctly first.

5. Overlapping Rules That Conflict

If you have multiple conditions that affect the same shipping method with contradictory logic.. one rule shows it, another hides it.. the outcome depends on which rule the plugin evaluates last.

Keep your rulesets clean and document what each one does. Remove or consolidate rules that overlap.

Related Resources

Frequently Asked Questions

Can I hide free shipping if a specific product is in the cart?

Yes. In WPFactory’s Conditional Shipping plugin, go to the Product tab and use the “Exclude Products” condition.

Enter the product name or ID in the Free Shipping row. The moment that product enters the cart, free shipping is hidden. You can apply the same logic to entire product categories using the Category tab.

How do I show different payment methods by country in WooCommerce?

Use the Cities tab in the plugin’s Payment Gateway section. Enable “Require Cities” and enter the country codes next to each payment gateway you want to restrict.

For example, entering NL next to iDEAL means iDEAL only appears for customers with a Netherlands billing address. All other customers see your standard payment options.

Can I use multiple conditions at the same time?

Yes. You can enable several condition types simultaneously.. for example, combining a cart total condition with a location condition. The AND/OR logical operator in the General tab controls how they interact.

AND means all conditions must be true at once. OR means any single condition being true is enough to trigger the rule.

What’s the difference between WPFactory’s plugin and the official WooCommerce Conditional Shipping and Payments extension?

Both solve the same core problem.. controlling which shipping and payment options appear at checkout based on rules.

WPFactory’s plugin adds user role conditions and date/time conditions that the official extension doesn’t include natively, and it typically comes at a lower price point.

If you’re already using other WPFactory plugins, it also integrates into the same dashboard environment.

Will conditional shipping rules affect the checkout experience on mobile?

Yes, the rules apply server-side in WooCommerce, so they affect every device.

When a condition is met, the relevant shipping or payment option appears or disappears in the checkout for all customers regardless of device. There’s no mobile-specific configuration needed.

Can I restrict cash on delivery to local orders only?

Yes. In the Cities tab, enable “Require Cities” for the COD gateway and enter your local area. Customers outside that area won’t see COD as an option.

This is one of the most common uses of conditional payment rules.. eliminating the risk of unpaid deliveries for long-distance orders.

How do I show same-day delivery only during business hours?

Use the Date/Time tab. Enable the condition and define the days and hours during which the same-day delivery method should appear.. for example, Monday through Friday, 8am to 2pm.

Outside those hours, the method automatically disappears from checkout. No manual toggling required.

Ready to Control Your WooCommerce Checkout?

Every scenario in this guide.. hiding shipping by product, restricting payment by location, showing methods by user role, time-based delivery windows.. is handled by WPFactory’s Conditional Shipping for WooCommerce. No developer needed. Configure everything from your WordPress dashboard and test changes in real-time.

Get the Plugin →

Also part of the Payment & Checkout Control Bundle – combine with payment restriction, order amount, and checkout customization tools.

all access · lifetime

The plugins behind most of what we write about.

A lot of the posts here reference WPFactory plugins because that's what we build with. All Access gets you every plugin we make, on as many sites as you run. Pay once. Own it.

lifetime, once
$ 499 once
vs. $59.99/yr per plugin, break-even after 9 plugins
  • Every WPFactory plugin, current and future
  • Unlimited sites, no per-site caps
  • Lifetime updates, no renewals
  • 30-day refund, no questions asked