---
title: Getting Started with Conditional Payment Methods by Location for WooCommerce
description: Install Payment Methods by Location, set how location is detected and add your first country, state, city or postcode rule.
url: "https://wpfactory.com/docs/payments-by-location-getting-started/"
updated: "2026-09-27"
category: Getting Started
---

# Getting Started with Conditional Payment Methods by Location for WooCommerce

To show or hide WooCommerce payment methods by customer location, install [Conditional Payment Methods by Location for WooCommerce](https://wpfactory.com/item/payment-gateways-by-customer-location-for-woocommerce/), choose how location is detected at **WPFactory > Payment Gateways by Customer Location > General**, then add countries, states, cities or postcodes to include or exclude for each gateway and save.

Payment Methods by Location removes a gateway from the checkout when the customer's country, state, city or postcode does not fit your rules. In the admin, the plugin and its menu item are labeled **Payment Gateways by Customer Location**.

## Before you start

- WooCommerce, installed and active.
- The payment methods you want to control enabled at **WooCommerce > Settings > Payments**.
- Rules work for every payment gateway registered with WooCommerce, including third-party and custom gateways. Since version 1.8.0 the free version handles any gateway too.

## Install and find the settings

1. Go to **Plugins > Add New Plugin**, upload the plugin zip and click **Activate**. If you install Pro while the free version is active, the free copy stops loading and Pro uses the same settings.
2. Go to **WPFactory > Payment Gateways by Customer Location** (also reachable at **WooCommerce > Settings > Payment Gateways by Customer Location**). The **Settings** link on the Plugins screen opens the same page.
3. You will see five sections: **General**, **Countries**, **States**, **Cities** and **Postcodes**.

![General section of WPFactory, Payment Gateways by Customer Location, showing the four Detect by dropdowns](https://wpfactory.com/wp-content/uploads/payments-by-location-getting-started-1.png)

## Set up your first location rule

1. In **General**, set **Detect country by**, **Detect state by**, **Detect city by** and **Detect postcode by**. All default to the billing address.
2. Open the section for the location type you need, for example **Countries**.
3. Check that the section's **Enable section** box is ticked (on by default).
4. Find the gateway by its admin name and fill in **Include** (gateway shows ONLY for these locations) or **Exclude** (gateway is hidden for these locations). Leave a field empty to ignore it.
5. Click **Save changes** and test the checkout in a private browser window.

## How rules combine

- Include and Exclude are checked separately. A gateway is hidden if the customer is not in its Include list, or is in its Exclude list.
- Countries, states, cities and postcodes are all checked. The gateway must pass every section that has a value for it.
- If the customer's location for a type is still empty (for example no state entered yet), that type is skipped.

## Guides

- [Show or hide payment methods by country](https://wpfactory.com/docs/payments-by-location-country/)
- [Restrict payment methods by state](https://wpfactory.com/docs/payments-by-location-state/)
- [Restrict payment methods by city](https://wpfactory.com/docs/payments-by-location-city/)
- [Restrict payment methods by postcode or ZIP code](https://wpfactory.com/docs/payments-by-location-postcode/)
- [Settings reference](https://wpfactory.com/docs/payments-by-location-settings-reference/) and [troubleshooting](https://wpfactory.com/docs/payments-by-location-troubleshooting/)

Need rules by cart total, user role or date as well? [Conditional Payment Methods for WooCommerce](https://wpfactory.com/item/conditional-payment-gateways-for-woocommerce/) covers those, see [its getting started guide](https://wpfactory.com/docs/conditional-payments-getting-started/). To choose gateways per product, see [Payment Methods by Product & Country for WooCommerce](https://wpfactory.com/item/payment-gateways-per-product-for-woocommerce/).

### 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

- [Payment Methods by Location Developer Hooks](https://wpfactory.com/docs/payments-by-location-developer-hooks/)
