3 plugin per limitare i metodi di pagamento di WooCommerce in base al paese (e come usarli)

Does your WooCommerce store accept a payment method that is only applicable to certain countries? Do you get order spam coming in from certain countries using non-instant payment methods like bank transfer (BACS)? There are many reasons to dynamically display different payment methods based on customer countries. For example:

  • Reduce WooCommerce order spam
  • Reduce customer confusion where different countries use different names for similar payment methods or the same name for different payment methods
  • Streamline your WooCommerce checkout by only displaying payment methods that apply to the customer
  • Avoid orders with payment methods that will incur extra costs when processed internationally (eg international cheque deposit fees or international bank transfer fees)

WooCommerce Country Based Payments

The WooCommerce Country Based Payments Plugin page on WordPress.org

Price: Free!

There is one free plugin I’ve found that can achieve this functionality, and that is the WooCommerce Country Based Payments plugin. It is more limited than the paid options and there is no guarantee it will work for you. In fact, it is known to not work with PayPal Checkout and Amazon Payments, so if you need to restrict either of those options, then this plugin will not work for you.

However, if you only want to configure some basic country-based payment restrictions, this plugin might be the perfect solution for you.

How does WooCommerce Country Based Payments work?

Install the WooCommerce Country Based Payments plugin via the WordPress plugin repository and it will add a new tab to your WooCommerce settings screen called “WCCBP”.

When you first activate the plugin, it will prompt you too allow the plugin developers permission to send you emails and provide non-sensitive diagnostic tracking. You can choose to allow and continue or you can skip this.

WCCBP - Tracking Opt-In

To access the new settings for WooCommerce Country Based Payments, go to your WooCommerce settings screen by selecting “Settings” from the WooCommerce menu in your WordPress dashboard.

WooCommerce Settings Menu Item

Navigate to that new “WCCBP” tab in your WooCommerce settings and you now have the options to select which countries each payment method should be available in.

WCCBP Settings Tab

There are buttons to quickly enable all countries or no countries. If you want to just enable the payment method for one or two countries, simply type those countries into the appropriate field and select them.

WCCBP Settings Screen

In the field beside the payment method, start typing the country name and then select it from the list.

WCCBP Country Selection

You can select multiple countries for each payment method if you need to by typing another country and selecting it from the list. If you need to remove a country, click the X beside the country name.

WCCBP Countries Selected

If you don’t set any countries for a particular payment method, the WooCommerce Country Based Payments plugin will enable that payment method for all countries, making sure you don’t accidentally limit payment options that should be available globally.

Once you are done, make sure you scroll to the end of the page and click the “Save Changes” button to save your configuration and then test it on the front-end!

Pros of the WooCommerce Country Based Payments plugin

  • I really like the WooCommerce Country Based Payments plugin because it is extremely simple and does exactly what it says on the box.
  • It’s free, so you can’t go past that.

Cons of the WooCommerce Country Based Payments plugin

  • WooCommerce Country Based Payments is not compatible with all payment methods, there is only community support if you run into trouble.
  • I’m not a fan of the information gathering step immediately after plugin activation, but it is a free plugin and you can choose to skip if you don’t want to allow the information sharing.

Further thoughts about the WooCommerce Country Based Payments plugin

One, thing that isn’t really a negative but that is worth mentioning is that the WooCommerce Country Based Payments plugin can only set country restrictions for payment methods, it cannot do anything more complex or take into account additional criteria, and that is where the other plugins below come into their own.

Conditional Shipping and Payments Plugin

WooCommerce Shipping and Payments Plugin Website

Price: $79 USD per year

The WooCommerce Conditional Shipping and Payments plugin is a premium option for handling payment options by billing country. However, this plugin goes above and beyond simply allowing you to specify different payment methods. The Conditional Shipping and Payments plugin allows you to apply complex conditional rules for when a payment method should be displayed (or excluded) utilising criteria like:

  • Weight
  • Products in the cart
  • Product categories in the cart
  • Order total
  • Shipping method
  • Shipping class
  • The country (of course)
  • The state
  • The postcode
  • The order currency (if using the multi-currency plugin)

You can even go so far as to set rules for specific customers, customer roles and it works with both the WooCommerce Memberships plugin and the WooCommerce Subscriptions plugin to restrict payment methods (and shipping methods) by members and subscriptions as well.

As you might have guessed from the name, the Conditional Shipping and Payments plugin also allows you to restrict shipping methods using many of the same rules. Handy.

How does WooCommerce Shipping and Payments plugin work?

First, go here and purchase a license for the WooCommerce Conditional Shipping and Payments plugin. Once you have completed your purchase, you will be able to download the plugin.

Upload and activate the WooCommerce Conditional Shipping and Payments plugin via your WordPress dashboard.

Navigate to the WooCommerce dashboard and click the new “Restrictions” tab in your WooCommerce settings.

WooCommerce Shipping and Payments Plugin Restrictions Tab

You will find three sub-sections for different restrictions.

  1. Payment Gateways
  2. Shipping Methods
  3. Shipping Countries & States

Navigate to the “Payment Gateways” restriction type to set the rules to restrict your payment methods to specific countries.

WooCommerce Shipping and Payments Plugin Payment Gateways Tab

The intuitive rule builder will let you create rules that will exclude the payment methods you select when the rule requirements are met. Here’s what you need to configure:

WooCommerce Shipping and Payments Plugin Payment Gateways Restriction Options

Short Description

You need to know what your rule is for, so enter a description in the Short Description field that describes the rules. This isn’t super important if you only have one or two rules, but if you are planning on having lots of payment and shipping rules, make sure you can identify them easily to save yourself time later on.

Exclude Payment Gateway/s

In the Exclude Gateways field, begin typing the name of the payment method or payment methods that you want to exclude from display for the country this rule applies to. Select the one you want from the drop down list that appears. You can exclude multiple payment methods in a single rule by adding each one to the Exclude Gateways field.

Show Excluded

If you tick the Show Excluded checkbox, then the excluded payment methods will still be visible at the checkout, even if the rules are met, however, if the customer chooses it, they will be shown an error message, preventing them from completing the checkout.

I recommend leaving this unticked to prevent frustration with your customers!

Custom Notice

If you choose to show the excluded payment method, you can specify a custom error message using the Custom Notice field to explain why the payment method is disabled for their country.

Show Static Notices

If you have the Show Excluded checkbox ticked and also tick the Show Static Notices checkbox then the notice will be shown below the payment method that has been restricted rather than only showing it if they attempt to checkout with that payment method.

Conditions

The Conditions section is where you will configure the actual rules. Each condition has three parts to it:

  1. Condition Type
  2. Modifier
  3. Condition Value

The first column is the Condition Type. This is what you want WooCommerce to take into account when evaluating whether the payment method should be available or not.

To restrict a payment method by the billing country, choose Billing Country from the condition type dropdown. If you would prefer to restrict the payment method by the shipping country then select Shipping Country from the condition type dropdown.

The second column is the Modifier. The modifier tells WooCommerce how to evaluate the condition type. For both the billing country and the shipping country you can choose either “Is” or “Is Not“.

If you choose “is”, then WooCommerce will exclude your payment method if the country is one of the ones you specify in the Condition Value column.

If you choose “is not”, then WooCommerce will exclude your payment method from all countries that are not specified in the Condition Value column.

The third column in the conditions section is the one we’ve just been talking about, the Condition Value. The condition value is what you are actually evaluating your rule against. In this column, you will choose the countries that you want to be considered.

WooCommerce Shipping and Payments Plugin Payment Gateways Restriction Billing Country Conditions

So for example, if you want to exclude a payment method when the billing country is Australia, you would make a rule that looks like this:

  • Condition Type: Billing Country
  • Modifier: Is
  • Condition Value: Australia

As a second example, if you want to exclude a payment method for all billing countries except for Singapore, you would configure your rule to look like this:

  • Condition Type: Billing Country
  • Modifier: Is Not
  • Condition Value: Singapore

That’s it, save your restrictions and you are good to go! Make sure to test them out on your store front-end to ensure they are working as you intended.

One thing to note, if you add multiple conditions to your restriction rule, then ALL of those conditions must be true for the rule to apply. So if you had a rule based on the billing country and order value, then both must be true. If you wanted a restriction to apply to both of those conditions separately (eg if only one of them is true), then you would need to create two restrictions. Hopefully, that makes sense? Clear as mud right?

Pros of the WooCommerce Conditional Shipping and Payments plugin?

  • The WooCommerce Conditional Shipping and Payments plugin can handle many complex rules around when to display different payment methods. With many different condition types to choose from, you are unlikely to come up with a scenario it can’t handle.
  • I like that the WooCommerce Conditional Shipping and Payments plugin can also handle your shipping restrictions for you all within one plugin.
  • The interface is polished and easy to use.

Cons of the WooCommerce Conditional Shipping and Payments plugin?

  • Costs $79 USD per year. While there is a lot of functionality included, it is a bit expensive.
  • Potentially overkill if you only want to restrict payment methods based on the country.

Further thoughts about the WooCommerce Conditional Shipping and Payments plugin?

While it might be on the slightly expensive side, WooCommerce Conditional Shipping and Payments comes very highly rated, with an average rating on the WooCommerce store of 5 stars out of 5 stars.

All round, the plugin provides extensive capability to restrict payment methods as well as shipping methods. It’s easy to use, and it does the job well. It’s worth the money if you need to handle more complex rules.

Booster Plus for WooCommerce Plugin

Booster Plus for WooCommerce Website Screenshot

Price: $69.99 USD per year or $109.99 USD with lifetime updates but reduced support.

The Booster for WooCommerce plugin is a freely available plugin that adds lots of extra functionality to WooCommerce in the form of modules that can be enabled if you need them. Booster Plus for WooCommerce is the premium version of Booster for WooCommerce and provides even more functionality. It can do so many things, it’s hard to keep track of everything. One of those extra features available in Booster Plus for WooCommerce is the “WooCommerce Payment Gateways by Country, State or Postcode” module.

The WooCommerce Payment Gateways by Country, State or Postcode module is a simple tool that allows you to either explicitly include or exclude a payment method based on a country, state or postcode. Like the free WooCommerce Country Based Payments Plugin, Booster Plus has a simple interface that lists all the supported payment methods along with the options to specify what countries and states to include or exclude. Most payment methods are supported, but I did notice that ZipPay/ZipMoney, does not come up in the list.

It’s worth noting that the state include/exclude rules are based on your store base country and you can choose whether to use the billing or shipping address to validate the payment rules against.

As the configuration for all your payment methods and their include/exclude rules are shown on a single settings page, it is a little overwhelming and a lot less polished in appearance than the slightly more expensive WooCommerce Conditional Shipping and Payments plugin.

Another thing to note is that while the rules don’t have anywhere near as many conditions available as the WooCommerce Shipping and Payments plugin, you can do a whole lot more with Booster Plus, if you need that extra functionality.

For the purposes of this article though where we want to restrict payment methods based on the billing country, Booster Plus does it with ease.

How does the Booster Plus WooCommerce Payment Gateways by Country, State or Postcode plugin module work?

First, go here and purchase a license for the Booster Plus for WooCommerce plugin. Once you have completed your purchase, you will be able to download the plugin.

Upload and activate the Booster Plus for WooCommerce plugin via your WordPress dashboard.

Navigate to the WooCommerce menu and click the new “Booster Settings” menu item.

Booster Plus Settings in the WooCommerce Menu

You will be taken to the Booster for WooCommerce dashboard which shows a long list of all the modules available sorted by category. By default, these modules are all disabled so you can just turn on the ones you need.

Scroll down to the Payment Gateways category and click the settings link directly below the “Gateways by Country, State or Postcode” module.

Booster Plus Gateway Modules

From this screen, you can enable the module and set up your restrictions to only show certain payment methods for certain countries. So, let’s go through the process and get it setup.

Gateways by Country, State or Postcode Enable Module

The very first option is a checkbox called Enable Module which must be ticked to turn this functionality on within Booster Plus for WooCommerce. Make sure you tick this box!

Booster Plus Enable Payment Gateways by Country Module

General Options

The General Options section contains three drop-down options related to how you want to determine the country. These settings apply to all payment methods.

The three drop-downs are:

  1. Detect Country By
  2. Detect State By
  3. Detect Postcode By

By default these are all based on the billing address, however, you can change them to the shipping address, and for the country, you can also choose to use their IP to determine their country.

Booster Plus Payment Gateways by Country General Options

For our purposes where we want to restrict a payment method for use in a certain billing country, leave Detect Country By set as “Billing Country“. You don’t need to do anything for the state or postcode unless you wish to use them as well.

Payment Gateways

This section contains all of the payment gateways aka payment methods that are installed on your WooCommerce store, even if they aren’t enabled. Chances are, this could be long.

Each payment gateway or payment method contains the same fields and you only need to enter data into the fields for the payment gateways that you want to apply restrictions to.

If you leave a field empty in this section, it will be ignored and won’t do anything. Restrictions will only apply to fields that you enter data into.

So, scroll down until you find the payment method you want to restrict, for me, I want to restrict a payment method called “Direct Bank Transfer” so it is only available to customers with a billing address in Australia.

Booster Plus Payment Gateways by Country Payment Method Fields

Each payment method has the same 6 fields:

  1. Include Countries – Specifying one or more countries in this field will show the payment method only when the customer country matches the criteria we set at the top of the page (for this example, that is billing country). The payment method will not be visible for customers from any other countries.
  2. Exclude Countries – Specifying one or more countries in this field will not show the payment method when the customer country matches the countries you enter here. The payment method will show for all other countries.
  3. Include States – Entering one or more states in this field will show the payment method only when the customer state matches. If the customer state does not match then the payment method will not be visible.
  4. Exclude States – Entering one or more states in this field will not show the payment method when the customer state matches. The payment method will be visible for all other states (and for customers from other countries as well).
  5. Include Postcodes – Entering one or more postcodes in this field will show the payment method only when the customer postcode matches. If the customer postcode does not match then the payment method will not be visible. You can list postcodes individually, use wildcards, or enter numeric postcode ranges.
  6. Exclude Postcodes – Entering one or more postcodes in this field will not show the payment method when the customer postcode matches. The payment method will be visible for all other postcodes.

Remember, you do not have to use all these fields, only the ones that you want to use.

So, coming back to my example, to just show the Direct Bank Transfer payment method to customers with a billing address in Australia, I would enter “Australia” in the Include Countries field. I don’t need to enter anything in any other fields.

Booster Plus Payment Gateways by Country Payment Method Include Country

Save changes

Once you have finished setting your rules, make sure to scroll all the way to the end of the page and click the blue Save Changes button to save your rules and activate the module. It’s really easy to miss this as it can be a really long way down that you need to scroll.

Head to your store front end and test to make sure your rules work as expected.

Pros of the Booster Plus plugin?

  • The Booster Plus plugin can do a lot more than just restrict payment methods to certain countries.
  • There are extra modules for other conditions you may want to restrict payment methods on (eg by currency, shipping method, order total, user roles, product categories)
  • One of the cheapest paid options
  • Comes with a lifetime upgrades option that makes it very cheap compared to competing options.

Cons of the Booster Plus plugin?

  • Potentially overkill if you only want to restrict payment methods based on the country and don’t have a use for any of the other modules.
  • When restricting payments via multiple methods, multiple modules are required that you must switch between. This is a bit clunky and not the easiest to use.
  • Doesn’t seem to support all payment gateways (eg ZipPay).

Further thoughts about the Booster Plus for WooCommerce plugin?

Booster Plus for WooCommerce provides a reasonably simple way of restricting payment methods based on the customer country. It comes with hundreds of other options for customising your WooCommerce store functionality, should you need them, and the pricing is very competitive.

Final Comments

Only displaying payment methods that actually apply to the country a customer resides in is a great way to simplify and streamline your WooCommerce checkout. Keeping things simple for customers reduces confusion, mistakes and can help to reduce lost sales. At the same time, you can reduce order spam, and potentially save on costs from payment methods that are more expensive in certain countries.

There are three great plugins that will help you to achieve this without using any code at all. If you don’t need any other rule-based functionality than the free “WooCommerce Country Based Payments” plugin does a brilliant job! However, if you want to add extra rules into your payment method restrictions, and if you want the easiest interface and widest compaitibility with payment gateway plugins, then I would go with the “Conditional Shipping and Payments” plugin.

Lascia un commento

it_ITItaliano