---
title: How to Restrict Payment Methods by State in WooCommerce
description: "Include or exclude states per payment gateway, using the billing or shipping state of your store's base country."
url: "https://wpfactory.com/docs/payments-by-location-state/"
updated: "2026-09-27"
category: How to
---

# How to Restrict Payment Methods by State in WooCommerce

To restrict payment methods by state in WooCommerce, use [Conditional Payment Methods by Location for WooCommerce](https://wpfactory.com/item/payment-gateways-by-customer-location-for-woocommerce/): go to **WPFactory > Payment Gateways by Customer Location > States**, select states in **Include states** or **Exclude states** for each gateway, choose billing or shipping state in General and save.

Examples: offer Cash on delivery only in the states you deliver to yourself, or hide a gateway in a state where it is not licensed.

## Before you start

- Payment Methods by Location installed and active.
- The state lists show the states of your store's base country only (set at **WooCommerce > Settings > General > Store Address**). The section notes this as *Base country states only*.

## Restrict payment methods by state

1. Go to **WPFactory > Payment Gateways by Customer Location** (also reachable at **WooCommerce > Settings > Payment Gateways by Customer Location**) and open **General**.
2. Set **Detect state by** to **Billing state** (default) or **Shipping state**, and save.
3. Open the **States** section and make sure **Gateways by state: Enable section** is ticked.
4. For each gateway, select states in **Include states** (gateway shows ONLY there) or **Exclude states** (gateway is hidden there).
5. Click **Save changes**.

![States section with Include states filled for Cash on delivery](https://wpfactory.com/wp-content/uploads/payments-by-location-state-1.png)

## Customers from other countries

State rules compare state codes only. Keep these cases in mind:

- A customer from another country who enters a state or province is not in your Include list, so a gateway with **Include states** is hidden for them.
- A customer from a country without states (empty state field) skips the state rule, so the gateway stays visible unless another rule hides it.
- To be explicit, pair a state rule with a country rule for the same gateway, see [show payment methods by country](https://wpfactory.com/docs/payments-by-location-country/).

## FAQ

### Why are there no states in the list?

Your store's base country has no predefined states in WooCommerce, or the base country is not the one you expected. Check **WooCommerce > Settings > General**.

### The payment methods do not change when the customer picks a state.

WooCommerce normally refreshes the checkout when a state dropdown changes. If your theme or checkout uses a free-text state field that does not refresh, add it under **General > Advanced Options > Force JavaScript checkout update**. See [troubleshooting](https://wpfactory.com/docs/payments-by-location-troubleshooting/).

### Can I restrict by postcode instead?

Yes, postcodes give finer control and support wildcards and ranges. See [restrict payment methods by postcode](https://wpfactory.com/docs/payments-by-location-postcode/).

### Get Payment Methods by Location

All location rules in this guide work with any payment gateway, including third-party and custom gateways. [See Conditional Payment Methods by Location for WooCommerce](https://wpfactory.com/item/payment-gateways-by-customer-location-for-woocommerce/).

Need a hand? Our team answers every ticket on the [Payment Methods by Location support forum](https://wpfactory.com/support/item/payment-gateways-by-customer-location-for-woocommerce/).

Related articles

- [How to Restrict Payment Methods by City in WooCommerce](https://wpfactory.com/docs/payments-by-location-city/)
- [Payment Methods by Location Developer Hooks](https://wpfactory.com/docs/payments-by-location-developer-hooks/)
- [Payment Methods by Location Settings Reference](https://wpfactory.com/docs/payments-by-location-settings-reference/)
- [Getting Started with Conditional Payment Methods by Location for WooCommerce](https://wpfactory.com/docs/payments-by-location-getting-started/)
