Shipping & payment rules
Shipping & payment rules hide shipping methods or payment methods, or stop shipping to some places, when an order meets your conditions. For example: no cash on delivery for cheese, no checks over $100, pickup only for local ZIP codes, or no shipping to Alaska and Hawaii. The customer gets a note saying why, in the classic checkout, the block checkout and the “Pay for order” page alike.
Rules only hide what WooCommerce already offers. They never change prices or shipping rates.
Add a rule
- Go to WooCommerce → Shipping & payment rules
- Select Add rule
- Give it a Name (for you only: customers never see it)
- Choose what it does:
- Hide shipping methods: tick the methods. Every … method covers that kind in every shipping zone.
- Hide payment methods: tick the payment methods.
- Don’t ship to some places: pick countries, or states to refuse only those states.
- Optionally, under Only for these products, pick products: the rule then counts only when one of them is in the cart, and the note names it
- Under When, select Add condition for each condition. Every condition has to hold. With none, the rule always applies
- Optionally write a Note for customers (see below)
- Select Save changes
Nothing changes at checkout until you add a rule. To pause a rule, select Turn off next to it in the list, and Turn back on later. Remove deletes it.
Conditions
- Order total (items), Subtotal, Order total (with shipping): is more than, less than, at least or at most an amount. Order total (with shipping) works only on payment rules.
- Number of items and Total weight.
- Category, Tag, Brand, Shipping class: some items, all items, no items or not all items are in them.
- Backorders and Sale items: some, all, no or not all items are on backorder or on sale.
- Shipping country or state, Billing country or state.
- Shipping ZIP code, Billing ZIP code: one per line.
537*matches every ZIP code starting 537;53700...53799is a range. Spaces and hyphens don’t matter, so postcodes such asSW1A 1AAwork as written. - Chosen shipping method: payment rules only, such as no bank transfer for local pickup.
- Coupons: a coupon (or one of the codes you list) is or isn’t used, or does or doesn’t give free shipping.
- Customer role, including Guest (not signed in).
- Customer: is or isn’t one of the email addresses you list (
*@example.commatches a whole domain), or has or hasn’t ordered before (failed, cancelled and pending orders don’t count; orders on hold for a bank transfer or check do). The email is the billing email the shopper types at checkout, so anyone can type an address on your list: to keep a payment method for certain customers, use Customer role instead, which needs them to sign in. - Date and time: the year, month, day of the month, day of the week or hour is (or isn’t) one you list, in the site’s time zone. Use numbers and ranges, such as
1-5for Monday to Friday (0 is Sunday).
For shipping rules, item conditions look at each package. For payment rules, they look at the whole cart.
What customers see
- Hidden methods are left out. When that leaves no shipping or payment method, the note says why, next to WooCommerce’s own “no methods available” message.
- Tick Keep them listed, with the note under them to keep a method in the list. When the customer chooses it, the note shows under it, and the order can’t be placed with it. In the classic checkout a few card payment methods draw their own fields without a description, so the note shows only when the order is placed.
- Places you don’t ship to: the note shows under the shipping methods as soon as the address is entered, asking for a different shipping address, and the order can’t be placed to that address.
- On the Pay for order page, refused payment methods are always hidden.
Leave Note for customers empty for a note that says what was hidden and what the customer can change, such as “Your order can’t be paid for with Check payments. To use it, please decrease your order total to $100.00 or less. Otherwise, choose a different payment method.” In your own note, {excluded_method}, {excluded_gateway}, {to_excluded_destination} and {product} fill in the method, payment method, place and product.
The rules run when the cart or checkout loads. Product pages and other cached pages are never affected.
Moving from WooCommerce Conditional Shipping and Payments
If the site used WooCommerce Conditional Shipping and Payments, Dirigible Store can copy its rules into the list above: the shipping method, payment method and destination rules, both the global ones and the ones set on products.
- Go to WooCommerce → Shipping & payment rules. The Import from WooCommerce Conditional Shipping and Payments box shows when the site has that plugin’s rules
- Select Check what will be imported. Nothing is changed yet: the box lists each rule with what it will do, what can’t be copied (with the reason) and what will work a little differently
- Select Import rules
- Turn WooCommerce Conditional Shipping and Payments off
While that plugin is on, its rules run and the rules here wait, so turning it off is the switch. You can import first and switch when you’re ready. The plugin’s own settings are only read, never changed.
How things carry over:
- Methods, places, conditions, custom notes and the “keep listed” choice come across as they are. The plugin’s description becomes the rule’s name.
- A rule set on a product becomes a rule for that product. Products with the same rule share one.
- Rules turned off in the plugin, or switched off by its settings, come in turned off.
- A rule with a condition Dirigible Store doesn’t have (product quantity, stock quantity, product attribute, order status, membership plan, subscriptions, currency or gift cards) is left out, because dropping the condition would hide more than the plugin did. The check names each one. Recreate it here another way, or leave it out.
- Notes you didn’t write yourself are worded a little differently from the plugin’s, and a refused place names the category (“remove products in Cheese”) where the plugin named the product.
- After changing rules in that plugin, select Check what will be imported and Import rules again: it replaces what it copied before and keeps rules you changed or removed here since.