Documentation

Conditional Shipping & Payment Rules

Hide shipping and payment methods, add payment fees or discounts, and stop orders, with notes for customers.

Conditional Shipping & Payment Rules for WooCommerceFrom $79 / year · 14-day money-back guaranteeView plugin →

Conditional Shipping & Payment Rules changes the checkout when conditions you set are true: it hides shipping or payment methods, adds a fee or discount for a payment method, or stops the order with a message. Each rule can show a short note so customers know why.

Requirements

  • WordPress 6.8 or newer
  • WooCommerce 10.0 or newer
  • PHP 7.4 or newer
  • Works with the classic checkout, the Cart and Checkout blocks, and High-Performance Order Storage.

Installation

  1. Download conditional-shipping-payment-rules.zip from My account > Downloads.
  2. In WordPress, go to Plugins > Add New Plugin > Upload Plugin, choose the zip file and click Install Now.
  3. Click Activate. The rules are under WooCommerce > Settings > Checkout rules.

Quick start: no cash on delivery for large orders

  1. Go to WooCommerce > Settings > Checkout rules. With no rules yet, you see four examples.
  2. Click Hide cash on delivery for large orders. The rule opens with the condition Cart subtotal is at least $500.
  3. Change the amount if you like, and edit the note customers see: “Cash on delivery is available for orders under $500.”
  4. Click Save changes. Every rule now shows a one-line summary of what it does.
The rules list: one line per rule, with a switch to turn it on or off.
The rules list: one line per rule, with a switch to turn it on or off.

What a rule can do

ActionWhat it does
Hide shipping methodsRemoves the chosen shipping methods from the cart and checkout. Choose single methods in any zone, or every method of a type, such as All Free shipping methods.
Hide payment methodsRemoves the chosen payment gateways at checkout.
Add a fee or discount for a payment methodAdds a fixed amount or a percentage of the order when the customer chooses the payment method. Choose a fee or a discount, your own label, and whether the fee is taxable.
Stop the orderShows your message in the cart and at checkout, and the order can’t be placed until the cart or address changes.
An open rule: the action, its targets, the conditions and the note for customers.
An open rule: the action, its targets, the conditions and the note for customers.

Conditions

A rule applies when all its conditions are true, or when any of them is true. A rule without conditions always applies.

GroupConditions
CartSubtotal, weight, number of items, products, categories, shipping classes, items on backorder, coupons
AddressShipping country or state, shipping postcode (with * wildcards and ranges such as 90000...96199), words in the address, billing country or state
CustomerLogged in, guest or returning customer, customer role
CheckoutThe chosen shipping method (for payment rules)
Date and timeDay of the week and time of day, in your store’s time zone

Rules that hide shipping methods look at the whole cart and the address of the package being priced. When a fact outside the package changes, such as the customer logging in, shipping rates are worked out again.

Notes for customers

A rule’s note appears in the cart and at checkout while the rule applies, in the classic pages and the Cart and Checkout blocks. Stop rules always show their message. Turn notes off for all rules under Checkout rules > Settings.

The Checkout block with a bank transfer discount and the notes of two rules.
The Checkout block with a bank transfer discount and the notes of two rules.

Payment fees and discounts

Fees and discounts are worked out from the order value before fees: the items after coupons, plus shipping. In the Checkout block they update as soon as the customer picks a payment method. A discount never makes the order total negative.

Cash on delivery is hidden for a large order; bank transfer and check payments are still offered.
Cash on delivery is hidden for a large order; bank transfer and check payments are still offered.

Stopping orders

Use stop rules for orders you can’t fulfil, such as deliveries to PO boxes or to regions you don’t serve. The example rule stops addresses that contain PO Box, P.O. Box or Post Office Box.

The message customers see at checkout.
The message customers see at checkout.

Preview for shop managers

Switch on Preview for shop managers under Checkout rules > Settings to see which rules applied while you browse the store as a shop manager. Customers don’t see the preview.

For developers

FilterUse
cspr_rulesThe rules before they are checked.
cspr_rule_matchesWhether a rule applies.
cspr_contextThe cart and customer facts conditions are checked against.
cspr_condition_definitionsAdd your own condition types; check them with cspr_custom_condition_matches.
cspr_fee_amountThe amount of a payment fee or discount.
cspr_example_rulesThe examples offered when there are no rules.

To change how notes look, copy public/templates/checkout-notes.php to yourtheme/conditional-shipping-payment-rules/checkout-notes.php and edit the copy.

Frequently asked questions

In what order are rules checked?

From top to bottom. Drag a rule by its handle, or use its arrows, to move it. Every rule that applies does its job, so two rules can hide different methods.

Can I hide every method of a type in all zones?

Yes. In the list of shipping methods, choose the type, such as All Free shipping methods, instead of single methods.

Does it work with Table Rate Shipping Rules?

Yes. Each Table rate rules method is listed like any other shipping method.

Changelog

1.5.2 · September 8, 2026

Maintenance

  • Fixed a settings notice remaining visible after the configuration had been saved.
  • Improved validation of saved settings during plugin updates.

1.5.0 · August 30, 2026

Compatibility update

  • Updated compatibility checks for current WooCommerce releases.
  • Improved translated notices and settings labels.

1.4.3 · May 1, 2026

Maintenance

  • Fixed a shipping class condition using the parent product class instead of the variation class.

1.4.0 · April 22, 2026

Feature update

  • Improved shipping conditions for destination and shipping class.
  • Improved recalculation when customers update quantities.

1.3.3 · December 14, 2025

Hotfix

  • Fixed a restriction notice remaining after an allowed address was selected.

1.3.0 · December 9, 2025

Feature update

  • Added customer notes explaining unavailable shipping and payment methods.
  • Improved messaging when no method meets the current conditions.

1.2.2 · August 7, 2025

Maintenance

  • Fixed a payment fee remaining in the totals after the payment method was changed.

1.2.0 · August 4, 2025

Feature update

  • Added payment fees and discounts.
  • Added configurable fee labels and tax handling.

1.1.5 · April 11, 2025

Hotfix

  • Fixed a category condition counting an excluded cart item toward the threshold.

1.1.0 · April 6, 2025

Feature update

  • Added conditions for order value, products, categories and customer roles.
  • Added clearer summaries and rule priority controls.

1.0.1 · December 5, 2024

Hotfix

  • Fixed a payment method staying hidden after the cart no longer matched its restriction.

1.0.0 · November 30, 2024

Initial release

  • Initial release.
  • Show or hide shipping and payment methods using cart and customer conditions.