How To January 22, 2025 14 min read

WooCommerce Conditional Shipping Rules: Set Complex Conditions Without Code

WooCommerce Conditional Shipping Rules: Set Complex Conditions Without Code
📘 How This Article Is Organised
This guide covers the technical side of WooCommerce conditional shipping.. how rules work, how conditions combine, and how to configure them step by step. If you’re looking for strategic use cases (e.g. “when should I restrict shipping by payment method?”), see our companion guide: WooCommerce Conditional Shipping & Payments: Use Cases & Scenarios →

Quick Answer: What Is WooCommerce Conditional Shipping?

WooCommerce conditional shipping lets you show or hide specific shipping methods based on rules you define.. without touching a single line of code.

  • Cart total → Show “Free Shipping” only when order value exceeds a threshold
  • Product or category → Restrict “Local Pickup” to specific product types
  • Customer location → Offer express delivery only to customers in certain cities or countries
  • User role → Give wholesale customers access to different shipping methods than retail buyers
  • Date & time → Disable same-day delivery after 3 PM or during weekends
  • AND/OR logic → Combine multiple conditions for precise, complex rules

Keep reading for a full configuration guide, 10 ready-to-use rule examples, and an interactive rule builder.

A customer in Germany adds a 15 kg piece of furniture to their cart and selects Free Shipping at checkout. Your free shipping offer was meant for lightweight accessories, not heavy freight.

By the time you spot the order, you’ve already lost money on the delivery.

This is the exact problem that WooCommerce conditional shipping rules solve.

Instead of offering every shipping method to every customer all the time, you define conditions.. and WooCommerce only shows the methods that match. No code. No workarounds. No manual order corrections after the fact.

This guide explains exactly how WooCommerce conditional shipping works at the technical level: how to configure each condition type, how AND/OR rule logic operates, and how to build multi-condition rules that handle real-world shipping scenarios.

You’ll also find 10 pre-built rule configurations you can apply to your store immediately.

What Are WooCommerce Conditional Shipping Rules?

By default, WooCommerce displays shipping methods based on shipping zones alone.. essentially just the customer’s country or region. That’s useful for basic setups, but it breaks down quickly once your store grows.

WooCommerce conditional shipping rules add a second layer of logic.

You attach conditions to each shipping method, and that method only appears at checkout when all (or any) of those conditions are met. The conditions can be based on:

  • Order value (minimum or maximum cart total)
  • Specific products, product categories, tags, or shipping classes
  • Customer location – country, state, or city
  • Customer identity – user role, specific user ID, or guest vs. logged-in
  • Payment gateway selected
  • Date and time of the order

You can apply these rules using the Conditional Shipping for WooCommerce plugin by WPFactory, which adds a full rule configuration panel to your WooCommerce dashboard.. no custom code required.

How Rule Logic Works: AND vs. OR

Before configuring any conditions, you need to understand how the plugin combines multiple conditions. This is controlled by a single setting: the Logical Operator.

AND Logic

When set to AND, every condition must be true for the shipping method to appear. Use this when you want strict, precise control.

Example: Show “Free Shipping” only when:

  • Cart total is over £75 AND
  • Customer is located in the United Kingdom AND
  • Cart does not contain products in the “Oversized” shipping class

All three conditions must be true simultaneously. If the cart total is £80 but the customer is in France, Free Shipping does not appear.

OR Logic

When set to OR, the shipping method appears if at least one condition is true. Use this when you want flexibility.. offering a method through multiple qualifying paths.

Example: Show “Express Delivery” if:

  • Customer has the “VIP” user role OR
  • Cart total exceeds £200

Either condition alone is enough. A VIP customer with a £30 cart still gets Express Delivery.

Choosing the Right Operator

Scenario Use Why
Restrict free shipping to UK orders over £75 with no heavy items AND All conditions must be met to qualify
Offer express delivery to VIP users OR high-value orders OR Either path qualifies the customer
Block local pickup for orders containing fragile products AND Product type AND pickup method must both apply
Show flat rate shipping if customer is outside EU OR if cart has oversized items OR Either condition alone triggers the rule

All Available Condition Types – Explained

The plugin gives you 11 condition categories. Here’s what each one does and when to use it:

Condition Type What It Controls Typical Use Case Complexity
Order Amount Min / Max cart total Free shipping over £75 Basic
Cities Require or exclude specific cities Local delivery only in Manchester Basic
User Roles Include / exclude by WooCommerce role Wholesale-only flat rate method Intermediate
Users Specific user IDs VIP customer perks Intermediate
Payment Gateways Tie shipping to payment method COD only available with flat rate Intermediate
Products Specific product IDs in cart Block free shipping for a specific SKU Intermediate
Product Categories Entire category in cart Restrict express delivery for “Furniture” Intermediate
Product Tags Products with specific tags Free shipping for “lightweight” tagged items Intermediate
Product Shipping Classes Shipping class assigned to products Heavy freight class triggers flat rate only Advanced
Date / Time Hours, days, months Same-day delivery disabled after 3 PM Advanced
Product Variations Specific variation attributes (size, colour) Restrict express delivery for XL size items Advanced

⚙️ Ready to Add Conditional Shipping Rules to Your Store?

The Conditional Shipping for WooCommerce plugin by WPFactory lets you build all the rules described in this guide.. no code required. Works with any WooCommerce shipping method and theme.

Get the Plugin → Conditional Shipping for WooCommerce

How to Configure WooCommerce Conditional Shipping Rules: Step by Step

Once you’ve installed and activated the Conditional Shipping for WooCommerce plugin, follow these steps to build your first rule set.

Step 1: Enable the Plugin

Navigate to WPFactory → WooCommerce Conditional Shipping in your WordPress dashboard. The first thing you’ll see in General Options is the enable/disable checkbox. Tick it to activate the plugin.

WooCommerce Conditional Shipping Rules - Enable the Plugin step

Step 2: Set Your Logical Operator

Still in General Options, choose your logical operator: AND or OR. This setting applies globally to all conditions you configure.

Choose AND for restrictive rules, OR for more permissive ones. You can override this per shipping instance if needed.

WooCommerce Conditional Shipping Rules - Set Your Logical Operator step

Step 3: Configure the “Require All” Option

If your conditions involve products (Require Products, Require Product Categories, etc.), decide whether all products in the cart must match the condition, or just one.

Enable “Require All” for the stricter interpretation.. every item in the cart must belong to the required category, for example.

Step 4: Enable “Use Shipping Instances”

If you have multiple instances of the same shipping method across different shipping zones (e.g. two Flat Rate methods with different prices), enable this option.

It lets you assign different conditional rules to each instance independently.

Step 5: Enable “Cart Instead of Package”

By default, conditions are evaluated per shipping package. Enabling this applies conditions to the entire cart.

This matters when customers have multiple packages in one order.. enabling it ensures all items are checked, not just those in a specific package.

WooCommerce shipping - Step3(3)

Step 6: Configure Each Condition Type

Navigate through the tabs for each condition type you want to use: Order Amount, Cities, User Roles, Products, etc. For each one:

  1. Enable the condition using its checkbox
  2. Choose whether to Require (include) or Exclude the specified values
  3. Enter your values (amounts, city names, role names, product IDs, etc.)
  4. Assign the rule to the relevant shipping method

Step 7: Enable Debug Mode (Recommended During Setup)

Before going live, enable the Debug option in General Options.

This adds a log to WooCommerce → Status → Logs that records which conditions are being evaluated and why a shipping method was shown or hidden. Invaluable for troubleshooting unexpected behaviour.

Step 8: Test at Checkout

Add test products to your cart and go through checkout with different user accounts, locations, and cart values to verify each rule behaves as expected. Clear WooCommerce session data between tests if shipping options aren’t updating.

Prefer watching? This short video summarizes the article in just a few minutes.

Worked Example: Building a Multi-Condition Shipping Rule

Let’s build a real rule from scratch: “Show Free Shipping only when cart total exceeds £75, the customer is in the UK, and the cart contains no products in the ‘Heavy Freight’ shipping class.”

Step Setting Value
1 Logical Operator AND
2 Order Amount → Minimum (Free Shipping) £75.00
3 Cities / Countries → Require United Kingdom (via Shipping Zone)
4 Product Shipping Classes → Exclude Heavy Freight
5 Require All (Shipping Classes) Disabled (exclude if ANY item has the class)

Result: A UK customer with £80 of lightweight products sees Free Shipping. The same customer with one Heavy Freight item in the cart does not.. even if the total exceeds £75.

Shipping Rule Library: 10 Ready-to-Use Configurations

Each rule below is named and pre-configured. Apply them directly to your store by matching the condition settings described.

Rule 1: Free Shipping for Orders Over £75 (UK Only)

Conditions: Order Amount Min = £75 AND Shipping Zone = United Kingdom
Operator: AND
Use when: You want to incentivise higher order values for domestic customers only.

Rule 2: Local Pickup Restricted to Specific Cities

Conditions: Cities → Require: [your city names, e.g. “Manchester, Leeds, Sheffield”]
Operator: AND
Use when: You have a physical location and only want nearby customers to choose pickup.

Rule 3: Wholesale Flat Rate (Wholesale Role Only)

Conditions: User Roles → Require: Wholesale Customer
Operator: AND
Use when: You run a B2B store and want wholesale clients to access a separate, cheaper flat rate method invisible to retail customers.

Rule 4: Express Delivery Blocked for Oversized Products

Conditions: Product Shipping Classes → Exclude: Oversized / Heavy Freight
Operator: AND
Use when: Your express courier has weight or size limits you need to enforce automatically.

Rule 5: Same-Day Delivery – Cut-Off at 2 PM

Conditions: Date/Time → Exclude Hours: 14:00–23:59 AND Exclude Days: Saturday, Sunday
Operator: AND
Use when: You offer same-day dispatch but only for orders placed before your warehouse cut-off time on weekdays.

Rule 6: Free Shipping for Specific Product Category Only

Conditions: Product Categories → Require: [e.g. “Accessories”] AND Order Amount Min = £30
Operator: AND
Use when: You want to run a category-specific free shipping promotion without applying it store-wide.

Rule 7: Cash on Delivery Only Available with Flat Rate

Conditions: Payment Gateways → Require: Cash on Delivery
Operator: AND
Applied to: Flat Rate method only
Use when: Your COD arrangement is only practical for local flat-rate deliveries, not express couriers.

Rule 8: VIP Members Get Free Shipping Regardless of Cart Total

Conditions: User Roles → Require: VIP (custom role)
Operator: OR
Combined with: Order Amount Min = £100 as a second OR condition
Use when: You want to reward loyalty programme members while also offering free shipping to large orders from any customer.

Rule 9: Restrict International Shipping for Fragile Items

Conditions: Product Tags → Require: “fragile” AND Shipping Zone → Exclude: International
Operator: AND
Use when: Certain products can only be shipped domestically due to packaging or insurance constraints.

Rule 10: Seasonal Free Shipping (December Only)

Conditions: Date/Time → Require Months: December AND Order Amount Min = £50
Operator: AND
Use when: You run a Christmas promotion and want free shipping to activate automatically in December without manually toggling it on and off.

Interactive Rule Builder

Use this tool to map out your shipping rule before configuring it in WooCommerce. Select your conditions and get a plain-English summary of the rule you’re building.



Common Mistakes When Setting Up WooCommerce Conditional Shipping

1. Using AND When You Mean OR (and Vice Versa)

The most frequent configuration error. If you set AND but only want one condition to trigger a rule, no customers will ever qualify unless they meet every single condition simultaneously. Always map your logic on paper before configuring.

2. Forgetting to Enable the Condition Checkbox

Each condition type has its own enable/disable checkbox. Entering values without ticking the enable checkbox means the condition is ignored entirely. Double-check every condition tab you’re using.

3. Not Using Debug Mode During Testing

If a shipping method isn’t appearing as expected, the WooCommerce log (when Debug is enabled) will tell you exactly which condition is blocking it. Skipping debug mode turns troubleshooting into guesswork.

4. Ignoring the “Require All” Setting

By default, a product condition fires if any product in the cart matches. If you want every product to match (e.g. all items must be in the “Accessories” category), you must enable Require All. Missing this creates unintended eligibility.

5. Conflicting Rules Across Shipping Instances

If you have the same shipping method in multiple zones with different conditions and “Use Shipping Instances” is disabled, the rules may conflict. Always enable shipping instances when you need method-level granularity.

6. Not Testing With Multiple User Accounts

Rules involving user roles behave differently for guests, logged-in customers, and wholesale users. Always test each rule with a separate test account for each role type before going live.

Related Resources

Frequently Asked Questions

What is WooCommerce conditional shipping?

WooCommerce conditional shipping refers to showing or hiding specific shipping methods based on rules you define.. such as cart total, product type, customer location, user role, or time of day. It lets you automate shipping eligibility without custom code.

Can I combine multiple conditions for a single shipping rule in WooCommerce?

Yes. The Conditional Shipping for WooCommerce plugin supports AND/OR logic, allowing you to stack multiple conditions.

For example, you can show Free Shipping only when cart total exceeds £75 AND the customer is in the UK AND the cart contains no oversized items.. all in a single rule.

What is the difference between AND and OR logic in WooCommerce shipping rules?

AND logic requires every condition to be true simultaneously for the shipping method to appear. OR logic requires only one condition to be true.

Use AND for strict, restrictive rules and OR for more flexible, permissive rules.

How do I restrict free shipping to specific countries in WooCommerce?

Use the location condition (via shipping zones) combined with a minimum order amount condition. Set the logical operator to AND, require the target country in your shipping zone, and set a minimum cart total.

The Free Shipping method will only appear when both conditions are met.

Can I restrict a WooCommerce shipping method based on product category?

Yes. The Product Categories condition lets you require or exclude entire categories.

For example, you can exclude the “Furniture” category from Free Shipping, or require the “Digital Accessories” category to access a specific flat rate tier.

How do I disable same-day delivery after a specific time in WooCommerce?

Use the Date/Time condition and set it to exclude specific hours.

For example, exclude hours 15:00–23:59 from Same-Day Delivery. You can also exclude specific days of the week (e.g. Saturday, Sunday) in the same condition tab.

Does WooCommerce support different shipping rules for wholesale vs. retail customers?

Yes, through the User Roles condition. You can require a specific role (e.g. “Wholesale Customer”) for a particular shipping method, making it invisible to standard retail buyers.

This is useful for B2B stores that have negotiated flat rates or freight arrangements with trade clients.

What happens if none of my conditional shipping rules match?

If all shipping methods have conditions and none of those conditions are met, no shipping methods will appear at checkout.

To avoid this, always keep at least one shipping method without conditional restrictions as a fallback.. typically a standard flat rate.

⚙️ Build Your First Conditional Shipping Rule Today

The Conditional Shipping for WooCommerce plugin gives you full control over which shipping methods appear.. and when. No code. No developer needed. Works with all major WooCommerce themes and shipping carriers.

Get Conditional Shipping for WooCommerce →

Also available as part of the WPFactory All Access bundle 60+ plugins for one annual price.

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