To restrict payment methods by country in Payment Methods by Product & Country for WooCommerce Pro, go to WPFactory > Payment Gateways per Products > Countries, tick Enable section, choose the billing countries and the gateways reserved for them, and save. For more rules, raise Number of payment by country restrictions to add more country and gateway pairs.
Before you start #
- Payment Methods by Product & Country for WooCommerce Pro.
- The Countries section enabled (
alg_wc_pgpp_countries_remove_enabled).
How a country condition works #
Each condition pairs a set of countries with a set of gateways. In the chosen countries, only those gateways are shown, and those gateways are removed from all other countries. The rule reacts to the billing country the customer enters at checkout.
Set up a single condition #
- Go to WPFactory > Payment Gateways per Products > Countries.
- Tick Enable section.
- In Choose countries, select the billing countries for this rule.
- In Choose gateways to appear only on selected countries above, select the gateways to reserve for those countries.
- Click Save changes.
Add more conditions #
Set Number of payment by country restrictions (alg_wc_pgpp_countries_restriction_number, default 1) to the number of separate country rules you need. Each additional block gives you another Choose countries plus Choose gateways pair, so you can, for example, reserve one wallet for Germany and a different local method for Brazil in the same store.
Combine with your product rules #
By default a matching country condition replaces your other rules for that country. Tick Combine conditions from other sections (alg_wc_pgpp_countries_combine_condition, default No) to have the country rules work together with your Category, Tag and Product rules instead of overriding them.
Options #
| Setting | Option ID | Default |
|---|---|---|
| Enable section | alg_wc_pgpp_countries_remove_enabled |
No |
| Combine conditions from other sections | alg_wc_pgpp_countries_combine_condition |
No |
| Number of restrictions | alg_wc_pgpp_countries_restriction_number |
1 |
| Choose countries (per block) | alg_wc_pgpp_countries_remove_countries |
(none) |
| Choose gateways (per block) | alg_wc_pgpp_countries_remove_include_gateway |
(none) |
For the second and later blocks, the country and gateway option ids carry a numeric suffix, for example alg_wc_pgpp_countries_remove_countries_2.
Ready to set this up? #
Country rules are a Pro feature of Payment Gateways per Products. Get Payment Gateways per Products Pro.