---
title: "AND vs OR: Combining Multiple Shipping Conditions"
description: Combine multiple WooCommerce shipping conditions with AND or OR using the Logical operator option, with worked examples.
url: "https://wpfactory.com/docs/conditional-shipping-and-or-logical-operator/"
updated: "2026-09-27"
category: How to
---

# AND vs OR: Combining Multiple Shipping Conditions

To control whether multiple shipping conditions combine as AND or OR, use the Logical operator option in [Conditional Shipping for WooCommerce: Restrict Shipping Options by Anything](https://wpfactory.com/item/conditional-shipping-for-woocommerce/). It decides how the plugin treats a shipping method when you have enabled more than one condition against it.

![Conditional Shipping General options showing the Logical operator setting](https://wpfactory.com/wp-content/uploads/Conditional-Shipping-Options.png)

### What the Logical operator does

The Logical operator only matters when MULTIPLE conditions are enabled. With a single enabled condition it has no effect.

- **AND** (default): the method shows only if EVERY enabled condition passes.
- **OR**: the method shows if ANY one enabled condition passes.

### Step-by-step setup

1. Go to **WPFactory > Conditional Shipping** (also reachable at **WooCommerce > Settings > Conditional Shipping**).
2. On the **General** section, set **Logical operator** (`alg_wc_cond_shipping_logical_operator`) to **AND** or **OR**.
3. Save changes.
4. Enable the conditions you want to combine in their own sections, then set their values against the shipping method.

### Worked examples

Say you want free shipping to appear only for large orders that also contain a specific product. Enable two conditions against the free shipping method: a minimum order amount, and a Require Product Shipping Classes condition set to a "Free" shipping class.

- With **AND**, free shipping shows only when the order is over the amount AND a product in the "Free" shipping class is in the cart. Both must be true.
- With **OR**, free shipping shows when the order is over the amount OR a product in the "Free" shipping class is in the cart. Either one is enough.

### Options reference

| Label | Option ID | Type | Default | Free/Pro |
| --- | --- | --- | --- | --- |
| Logical operator | `alg_wc_cond_shipping_logical_operator` | Select (AND / OR) | AND | Free |

### Per-rate control for developers

The operator is global by default, but developers can override it per rate with the `alg_wc_cond_shipping_logical_operator` filter, which receives the operator, the rate and the package and returns `'AND'` or `'OR'`. See the [Conditional Shipping](https://wpfactory.com/item/conditional-shipping-for-woocommerce/) developer hooks reference for the full signature.

### Get more control

This feature is free. [Conditional Shipping for WooCommerce: Restrict Shipping Options by Anything](https://wpfactory.com/item/conditional-shipping-for-woocommerce/) Pro adds per shipping-instance conditions, so you can combine rules differently for the same method type across shipping zones. [See what Pro unlocks](https://wpfactory.com/item/conditional-shipping-for-woocommerce/).

Related articles

- [Exploring Conditional Shipping Conditions](https://wpfactory.com/docs/conditional-shipping-conditions/)
- [Set Shipping Conditions Per Shipping Method Instance](https://wpfactory.com/docs/conditional-shipping-per-shipping-instance/)
- [Common Shipping Condition Setup Mistakes](https://wpfactory.com/docs/common-shipping-condition-setup-mistakes/)
- [Shipping Conditions Ignored at Checkout](https://wpfactory.com/docs/shipping-conditions-ignored/)
- [Show Cart and Checkout Notices for Hidden Shipping Methods](https://wpfactory.com/docs/conditional-shipping-cart-checkout-notices/)
