Holiday Sale 30% OFF sitewide on all WordPress & WooCommerce plugins — use code HOLIDAY30 Shop Now →
Documentation Updated Nov 30, 2026

Disable Payment Methods by Countries (for WooCommerce) Documentation

WooCommerce Extension Guide

Disable Payment Methods by Countries lets you control which payment gateways appear at WooCommerce checkout based on each customer's country. Enforce regional compliance, prevent unsupported gateway errors, and tailor your checkout flow with zero code.

Installation

You can install the plugin either via WordPress Admin (ZIP upload) or directly from your WooCommerce.com subscription.

OPTION A · ZIP UPLOAD

Install via WordPress Admin

Download the plugin .zip file from your account, go to Plugins → Add New → Upload Plugin, choose the archive, and click Install Now → Activate.

OPTION B · WOOCOMMERCE.COM

Use “Add to Store”

Open My Subscriptions in your WooCommerce.com account, click Add to store next to the extension, and follow the on-screen prompts to install automatically.

Configuration

Once activated, open the plugin settings at WooCommerce → Settings → Disable Payment Methods by Countries.

Prerequisite Error Checks

Before configuring gateway rules, the settings screen checks two requirements:

1. WooCommerce Not Active

If WooCommerce is inactive or missing, an admin notice prompts you to install and activate WooCommerce first.

  • Fix: Go to Plugins and activate WooCommerce.

2. No Payment Methods Enabled

If no payment gateways are currently enabled in WooCommerce, the configuration page displays a warning.

  • Fix: Open WooCommerce → Settings → Payments and enable at least one gateway.

Configuring Gateway Rules

The settings page automatically lists every active payment gateway on your store alongside two controls per gateway:

Blocked Countries

Enter comma-separated two-letter ISO country codes (for example, US, CA, GB) to hide that gateway for customers from those countries.

  • Leave empty to allow the gateway in all countries.

Inverse Selection (Allowlist Mode)

Check Inverse Selection to flip the rule so the payment method is only allowed in the listed countries and hidden everywhere else.

  • Ideal for local methods like Cash on Delivery, SEPA, or regional wallets.

Country Detection Method

Choose how the customer's location is evaluated at checkout:

MODE 01

Billing Country

Matches the customer's selected checkout billing country. Best for card compliance and billing-region rules.

MODE 02

Shipping Country

Matches the customer's shipping destination country. Ideal for Cash on Delivery and fulfillment-based restrictions.

MODE 03

IP Geolocation (MaxMind)

Detects the visitor's country via IP address using WooCommerce's MaxMind integration before address fields are filled.

Auto-Refresh Checkout Page on Country Change

Enable Auto-Refresh Checkout Page on Country Change if you notice a payment gateway's inner UI (such as hosted buttons, iframes, or card fields) fails to re-render when a customer switches countries at checkout.

When to Enable Auto-Refresh

While gateways such as Stripe generally support WooCommerce's dynamic AJAX fragment updates, certain gateways (such as PayPal in some theme setups) may not re-initialize their buttons cleanly after an AJAX country change. Enabling Auto-Refresh forces a full page reload so every eligible gateway initializes properly.

Why Gateways Wait for Mandatory Address Fields

During checkout, WooCommerce only triggers a background gateway refresh after all mandatory address fields for the newly selected country are completed:

  • Countries with mandatory sub-fields: For example, Sweden requires a ZIP/Postal code, while the United States, India, and Thailand require both a State/Province and a ZIP/Postal code. Gateways update once those required fields are filled.
  • Countries with optional sub-fields: For countries where sub-fields are optional (such as Vietnam), gateways refresh immediately as soon as the country is selected.
Pro Tip · Instant Detection on Load

Setting Country Detection Method to IP Geolocation (MaxMind) pre-determines the customer's country on initial page load, eliminating the wait for manual address completion at checkout.

Country Codes Reference Chart

Country codes are two-letter ISO 3166-1 alpha-2 codes used by WooCommerce. You can also open the built-in Country Code Reference Chart button under Quick Instructions inside the plugin settings, or look up any code below (244 countries).

Country Name WooCommerce Code
Åland IslandsAX
AfghanistanAF
AlbaniaAL
AlgeriaDZ
AndorraAD
AngolaAO
AnguillaAI
AntarcticaAQ
Antigua and BarbudaAG
ArgentinaAR
ArmeniaAM
ArubaAW
AustraliaAU
AustriaAT
AzerbaijanAZ
BahamasBS
BahrainBH
BangladeshBD
BarbadosBB
BelarusBY
BelauPW
BelgiumBE
BelizeBZ
BeninBJ
BermudaBM
BhutanBT
BoliviaBO
Bonaire, Saint Eustatius and SabaBQ
Bosnia and HerzegovinaBA
BotswanaBW
Bouvet IslandBV
BrazilBR
British Indian Ocean TerritoryIO
British Virgin IslandsVG
BruneiBN
BulgariaBG
Burkina FasoBF
BurundiBI
CambodiaKH
CameroonCM
CanadaCA
Cape VerdeCV
Cayman IslandsKY
Central African RepublicCF
ChadTD
ChileCL
ChinaCN
Christmas IslandCX
Cocos (Keeling) IslandsCC
ColombiaCO
ComorosKM
Congo (Brazzaville)CG
Congo (Kinshasa)CD
Cook IslandsCK
Costa RicaCR
CroatiaHR
CubaCU
CuraÇaoCW
CyprusCY
Czech RepublicCZ
DenmarkDK
DjiboutiDJ
DominicaDM
Dominican RepublicDO
EcuadorEC
EgyptEG
El SalvadorSV
Equatorial GuineaGQ
EritreaER
EstoniaEE
EthiopiaET
Falkland IslandsFK
Faroe IslandsFO
FijiFJ
FinlandFI
FranceFR
French GuianaGF
French PolynesiaPF
French Southern TerritoriesTF
GabonGA
GambiaGM
GeorgiaGE
GermanyDE
GhanaGH
GibraltarGI
GreeceGR
GreenlandGL
GrenadaGD
GuadeloupeGP
GuatemalaGT
GuernseyGG
GuineaGN
Guinea-BissauGW
GuyanaGY
HaitiHT
Heard Island and McDonald IslandsHM
HondurasHN
Hong KongHK
HungaryHU
IcelandIS
IndiaIN
IndonesiaID
IranIR
IraqIQ
Isle of ManIM
IsraelIL
ItalyIT
Ivory CoastCI
JamaicaJM
JapanJP
JerseyJE
JordanJO
KazakhstanKZ
KenyaKE
KiribatiKI
KuwaitKW
KyrgyzstanKG
LaosLA
LatviaLV
LebanonLB
LesothoLS
LiberiaLR
LibyaLY
LiechtensteinLI
LithuaniaLT
LuxembourgLU
Macao S.A.R., ChinaMO
MacedoniaMK
MadagascarMG
MalawiMW
MalaysiaMY
MaldivesMV
MaliML
MaltaMT
Marshall IslandsMH
MartiniqueMQ
MauritaniaMR
MauritiusMU
MayotteYT
MexicoMX
MicronesiaFM
MoldovaMD
MonacoMC
MongoliaMN
MontenegroME
MontserratMS
MoroccoMA
MozambiqueMZ
MyanmarMM
NamibiaNA
NauruNR
NepalNP
NetherlandsNL
Netherlands AntillesAN
New CaledoniaNC
New ZealandNZ
NicaraguaNI
NigerNE
NigeriaNG
NiueNU
Norfolk IslandNF
North KoreaKP
NorwayNO
OmanOM
PakistanPK
Palestinian TerritoryPS
PanamaPA
Papua New GuineaPG
ParaguayPY
PeruPE
PhilippinesPH
PitcairnPN
PolandPL
PortugalPT
QatarQA
Republic of IrelandIE
ReunionRE
RomaniaRO
RussiaRU
RwandaRW
São Tomé and PríncipeST
Saint BarthélemyBL
Saint HelenaSH
Saint Kitts and NevisKN
Saint LuciaLC
Saint Martin (Dutch part)SX
Saint Martin (French part)MF
Saint Pierre and MiquelonPM
Saint Vincent and the GrenadinesVC
San MarinoSM
Saudi ArabiaSA
SenegalSN
SerbiaRS
SeychellesSC
Sierra LeoneSL
SingaporeSG
SlovakiaSK
SloveniaSI
Solomon IslandsSB
SomaliaSO
South AfricaZA
South Georgia/Sandwich IslandsGS
South KoreaKR
South SudanSS
SpainES
Sri LankaLK
SudanSD
SurinameSR
Svalbard and Jan MayenSJ
SwazilandSZ
SwedenSE
SwitzerlandCH
SyriaSY
TaiwanTW
TajikistanTJ
TanzaniaTZ
ThailandTH
Timor-LesteTL
TogoTG
TokelauTK
TongaTO
Trinidad and TobagoTT
TunisiaTN
TurkeyTR
TurkmenistanTM
Turks and Caicos IslandsTC
TuvaluTV
UgandaUG
UkraineUA
United Arab EmiratesAE
United Kingdom (UK)GB
United States (US)US
UruguayUY
UzbekistanUZ
VanuatuVU
VaticanVA
VenezuelaVE
VietnamVN
Wallis and FutunaWF
Western SaharaEH
Western SamoaWS
YemenYE
ZambiaZM
ZimbabweZW

Need Technical Assistance?

Questions about gateway compatibility, MaxMind geolocation, or custom checkout setups? Reach our engineering team directly.

Contact TechRBun Support →