How to create billing address-based conditional payments rule

A billing address rule shows or hides payment methods based on the billing details the customer enters at checkout.

In the current admin, the Billing Address group includes First Name, Last Name, Company, Address, Address 2, Country, State / Province, City, Postcode, Email, and Phone.

Billing address conditions

Use any of the current Billing Address fields: First Name, Last Name, Company, Address, Address 2, Country, State / Province, City, Postcode, Email, and Phone.

The Conditions dropdown open on a Billing Address group, with First Name selected, and Last Name, Company, Address, Address 2, Country, City, Postcode, Email, Phone, and Previous Order listed; the Customer group starts below
Figure - An older Billing Address dropdown, which omits State / Province

The screenshot above is from an earlier plugin version. It does not list State / Province, which appears in the current Billing Address group. It also shows Previous Order at the end of this list; in the current admin, Previous Order is in the Customer group.

How to create the rule

  1. Go to WooCommerce > Settings > Payments, then open Conditions and click Add New. Turn on Status and enter a Rule Name.
  2. In Conditions, choose a billing address field (for example, Country), an operator, and a value. Click + Add Condition if needed.
  3. In Actions, choose Enable Payments Methods or Disable Payments Method and select the payment methods. Click Save Changes, then test checkout.
A Country condition set to Not Equal to United States (US), with a Disable Payments Method action for Cash on delivery
Figure - A Country condition that disables Cash on Delivery when the country is not the United States

The rule screenshot above shows a Country field. It does not show the group name. The same image is also used in the shipping address article. In the current admin, Country is in Billing Address.

Checkout with Country / Region set to United Kingdom (UK), showing Direct bank transfer and Check payments, with an annotation that COD is hidden because the selected billing country is not the US
Figure - A checkout page annotated as hiding Cash on Delivery based on the billing country

Pro Tips

  • Use State / Province when you need a region-level rule. That field is in the current Billing Address group, even though the older dropdown screenshot omits it.
  • Email and Phone are also in the current Billing Address group.
  • Give the rule a name that includes “billing,” so it is not confused with a shipping-address rule.

Common Use Cases

1. Hide Cash on Delivery for international billing countries

Use Country Not Equal to ( != ) your local country and Disable Payments Method for Cash on delivery.

2. Enable a method for a billing company

Use Company with Enable Payments Methods for the method you want to offer.

3. Offer a method for selected billing postcodes

Use Postcode with Enable Payments Methods for a method such as Direct bank transfer.

FAQs

1. Which billing fields are in the current admin?

First Name, Last Name, Company, Address, Address 2, Country, State / Province, City, Postcode, Email, and Phone.

2. Why is State / Province missing from the dropdown screenshot?

That screenshot is from an earlier version. The current admin includes State / Province in Billing Address.

3. Is Previous Order a billing address condition?

Not in the current admin. Previous Order is in the Customer group.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.