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.
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.
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:
Billing Country
Matches the customer's selected checkout billing country. Best for card compliance and billing-region rules.
Shipping Country
Matches the customer's shipping destination country. Ideal for Cash on Delivery and fulfillment-based restrictions.
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.
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.
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 Islands | AX |
| Afghanistan | AF |
| Albania | AL |
| Algeria | DZ |
| Andorra | AD |
| Angola | AO |
| Anguilla | AI |
| Antarctica | AQ |
| Antigua and Barbuda | AG |
| Argentina | AR |
| Armenia | AM |
| Aruba | AW |
| Australia | AU |
| Austria | AT |
| Azerbaijan | AZ |
| Bahamas | BS |
| Bahrain | BH |
| Bangladesh | BD |
| Barbados | BB |
| Belarus | BY |
| Belau | PW |
| Belgium | BE |
| Belize | BZ |
| Benin | BJ |
| Bermuda | BM |
| Bhutan | BT |
| Bolivia | BO |
| Bonaire, Saint Eustatius and Saba | BQ |
| Bosnia and Herzegovina | BA |
| Botswana | BW |
| Bouvet Island | BV |
| Brazil | BR |
| British Indian Ocean Territory | IO |
| British Virgin Islands | VG |
| Brunei | BN |
| Bulgaria | BG |
| Burkina Faso | BF |
| Burundi | BI |
| Cambodia | KH |
| Cameroon | CM |
| Canada | CA |
| Cape Verde | CV |
| Cayman Islands | KY |
| Central African Republic | CF |
| Chad | TD |
| Chile | CL |
| China | CN |
| Christmas Island | CX |
| Cocos (Keeling) Islands | CC |
| Colombia | CO |
| Comoros | KM |
| Congo (Brazzaville) | CG |
| Congo (Kinshasa) | CD |
| Cook Islands | CK |
| Costa Rica | CR |
| Croatia | HR |
| Cuba | CU |
| CuraÇao | CW |
| Cyprus | CY |
| Czech Republic | CZ |
| Denmark | DK |
| Djibouti | DJ |
| Dominica | DM |
| Dominican Republic | DO |
| Ecuador | EC |
| Egypt | EG |
| El Salvador | SV |
| Equatorial Guinea | GQ |
| Eritrea | ER |
| Estonia | EE |
| Ethiopia | ET |
| Falkland Islands | FK |
| Faroe Islands | FO |
| Fiji | FJ |
| Finland | FI |
| France | FR |
| French Guiana | GF |
| French Polynesia | PF |
| French Southern Territories | TF |
| Gabon | GA |
| Gambia | GM |
| Georgia | GE |
| Germany | DE |
| Ghana | GH |
| Gibraltar | GI |
| Greece | GR |
| Greenland | GL |
| Grenada | GD |
| Guadeloupe | GP |
| Guatemala | GT |
| Guernsey | GG |
| Guinea | GN |
| Guinea-Bissau | GW |
| Guyana | GY |
| Haiti | HT |
| Heard Island and McDonald Islands | HM |
| Honduras | HN |
| Hong Kong | HK |
| Hungary | HU |
| Iceland | IS |
| India | IN |
| Indonesia | ID |
| Iran | IR |
| Iraq | IQ |
| Isle of Man | IM |
| Israel | IL |
| Italy | IT |
| Ivory Coast | CI |
| Jamaica | JM |
| Japan | JP |
| Jersey | JE |
| Jordan | JO |
| Kazakhstan | KZ |
| Kenya | KE |
| Kiribati | KI |
| Kuwait | KW |
| Kyrgyzstan | KG |
| Laos | LA |
| Latvia | LV |
| Lebanon | LB |
| Lesotho | LS |
| Liberia | LR |
| Libya | LY |
| Liechtenstein | LI |
| Lithuania | LT |
| Luxembourg | LU |
| Macao S.A.R., China | MO |
| Macedonia | MK |
| Madagascar | MG |
| Malawi | MW |
| Malaysia | MY |
| Maldives | MV |
| Mali | ML |
| Malta | MT |
| Marshall Islands | MH |
| Martinique | MQ |
| Mauritania | MR |
| Mauritius | MU |
| Mayotte | YT |
| Mexico | MX |
| Micronesia | FM |
| Moldova | MD |
| Monaco | MC |
| Mongolia | MN |
| Montenegro | ME |
| Montserrat | MS |
| Morocco | MA |
| Mozambique | MZ |
| Myanmar | MM |
| Namibia | NA |
| Nauru | NR |
| Nepal | NP |
| Netherlands | NL |
| Netherlands Antilles | AN |
| New Caledonia | NC |
| New Zealand | NZ |
| Nicaragua | NI |
| Niger | NE |
| Nigeria | NG |
| Niue | NU |
| Norfolk Island | NF |
| North Korea | KP |
| Norway | NO |
| Oman | OM |
| Pakistan | PK |
| Palestinian Territory | PS |
| Panama | PA |
| Papua New Guinea | PG |
| Paraguay | PY |
| Peru | PE |
| Philippines | PH |
| Pitcairn | PN |
| Poland | PL |
| Portugal | PT |
| Qatar | QA |
| Republic of Ireland | IE |
| Reunion | RE |
| Romania | RO |
| Russia | RU |
| Rwanda | RW |
| São Tomé and Príncipe | ST |
| Saint Barthélemy | BL |
| Saint Helena | SH |
| Saint Kitts and Nevis | KN |
| Saint Lucia | LC |
| Saint Martin (Dutch part) | SX |
| Saint Martin (French part) | MF |
| Saint Pierre and Miquelon | PM |
| Saint Vincent and the Grenadines | VC |
| San Marino | SM |
| Saudi Arabia | SA |
| Senegal | SN |
| Serbia | RS |
| Seychelles | SC |
| Sierra Leone | SL |
| Singapore | SG |
| Slovakia | SK |
| Slovenia | SI |
| Solomon Islands | SB |
| Somalia | SO |
| South Africa | ZA |
| South Georgia/Sandwich Islands | GS |
| South Korea | KR |
| South Sudan | SS |
| Spain | ES |
| Sri Lanka | LK |
| Sudan | SD |
| Suriname | SR |
| Svalbard and Jan Mayen | SJ |
| Swaziland | SZ |
| Sweden | SE |
| Switzerland | CH |
| Syria | SY |
| Taiwan | TW |
| Tajikistan | TJ |
| Tanzania | TZ |
| Thailand | TH |
| Timor-Leste | TL |
| Togo | TG |
| Tokelau | TK |
| Tonga | TO |
| Trinidad and Tobago | TT |
| Tunisia | TN |
| Turkey | TR |
| Turkmenistan | TM |
| Turks and Caicos Islands | TC |
| Tuvalu | TV |
| Uganda | UG |
| Ukraine | UA |
| United Arab Emirates | AE |
| United Kingdom (UK) | GB |
| United States (US) | US |
| Uruguay | UY |
| Uzbekistan | UZ |
| Vanuatu | VU |
| Vatican | VA |
| Venezuela | VE |
| Vietnam | VN |
| Wallis and Futuna | WF |
| Western Sahara | EH |
| Western Samoa | WS |
| Yemen | YE |
| Zambia | ZM |
| Zimbabwe | ZW |
Need Technical Assistance?
Questions about gateway compatibility, MaxMind geolocation, or custom checkout setups? Reach our engineering team directly.