How to create shipping address-based conditional payments rule
A shipping address rule shows or hides payment methods based on the shipping details the customer enters at checkout.
Existing documentation screenshots show a Shipping Address group with First Name, Last Name, Company, Address, Address 2, Country, City, and Postcode. That group is not visible in the current admin condition dropdown screenshot, which shows Shipping Specific (Shipping Method) and Billing Address instead. The steps below follow the existing article screenshots, and the current placement of these fields is unconfirmed.
Shipping address conditions
The existing documentation screenshot lists these Shipping Address fields:
- First Name, Last Name, Company
- Address, Address 2
- Country, City, Postcode
That cropped screenshot does not show State / Province, Email, or Phone in the Shipping Address group. Do not assume those shipping fields exist unless you can see them in your admin dropdown.
How to create the rule
- Go to WooCommerce > Settings > Payments, then open Conditions and click Add New. Turn on Status and enter a Rule Name.
- In Conditions, choose a shipping address field (for example, Country), an operator such as Not Equal to ( != ), and a value. Click + Add Condition if needed.
- In Actions, choose Enable Payments Methods or Disable Payments Method and select the payment methods. Click Save Changes, then test checkout.
The rule screenshot above shows a Country field. It does not show whether that field was taken from Shipping Address or Billing Address. The same image is also used in the billing address article.
The existing guide notes that when Ship to a different address? is unchecked, billing address fields are treated as shipping fields. Confirm this behavior in a test checkout on your store.
Pro Tips
- If you cannot find a Shipping Address group in the current dropdown, look under Billing Address for the matching field names, and confirm with a checkout that uses a different shipping address.
- Test both a checked and an unchecked Ship to a different address? option.
- Use a Rule Name that states whether you intend the rule for shipping or billing, so the list stays clear.
Common Use Cases
1. Hide Cash on Delivery for international shipments
Use Country not equal to your local country and Disable Payments Method for Cash on delivery.
2. Enable a method for shipments to a company
Use Company with Enable Payments Methods for the method you want to offer to those shipments.
3. Offer a method for selected postcodes
Use Postcode with Enable Payments Methods for a method such as Direct bank transfer.
FAQs
1. Is the Shipping Address group in the current admin?
It appears in existing documentation screenshots. It is not visible in the current admin condition dropdown screenshot, so its current placement is unconfirmed.
2. Does the example rule screenshot show shipping or billing?
It shows a Country condition and a Disable Payments Method action for Cash on delivery. The group name is not visible in that screenshot.
3. What happens if the customer does not ship to a different address?
The existing guide says billing fields are then treated as shipping fields. Test this on your checkout before you rely on it.