Do you need help in setting restrictions on country-based payment methods? You have reached the right place. Restricting payment methods based on the country is important for any store; you can display appropriate payment methods based on the amount, cart, product, tags, etc. Using country-based restrictions excludes expensive payment methods if a customer is buying one product.
Additionally, the customer can use any bank to pay if you have restricted the payment method, which helps the customer gain satisfaction in buying stuff from your online store. This complete guide will help you to set up country-based restrictions on your store very easily and effortlessly.
A Complete Setup Of Country-Based Restriction
Limiting country restrictions is a small process. It is just one click away from WooCommerce. You have to enable a few options from the WooCommerce plugin settings, which will help you limit the payment on your store.
Here are the two options for payment method restriction in WooCommerce:
- Country Restriction for WooCommerce Plugin By Addify
- By Custom Code
Method-1: By Country Restriction for WooCommerce Plugin
Restricting through the Country restrictions WooCommerce plugin is an easy process without any technical expert required. Still, suppose you will opt for a code for applying payment limitations on the country. In that case, it will be tricky as it will require a custom code for restricting payment based on different countries and will also require a technical expert.
Following are some steps through which you can configure country-based restrictions on payment methods in WooCommerce.
- Installation
- Configure the Country-Based Restriction on Payment Method
- General Settings
- Conceal Payment Method
- Manage Payment Visibility by Product Level
- Manage Payment Visibility in Bulk
1. Installation
To set up Country-based Restrictions on Payment Methods in WooCommerce, start with the installation process by downloading the file from the WooCommerce Account. Once you are done downloading, head over to plugins from WordPress Admin and upload the file you downloaded by clicking Add New. Now, you can easily install and activate the plugin in the WooCommerce store.
2. Configure the Country-Based Restriction on Payment Method
Once you have activated the Country-based Restriction plugin, under the admin menu of WooCommerce, you will be able to see the Country Restriction option. By selecting the view settings options, you can easily Configure the Country-Based Restriction on Payment Method.
3. General Settings
Do you want to customize the country’s visibility? Head to settings by clicking country restrictions and navigate to general settings. Once you are on the general settings page, you can effortlessly edit the visibility option and set up the limitations for the countries from which restriction is not added.
It is as simple as you choose to conceal all products, then the whole store products will be concealed from everyone until and unless you give a permit to the rules to specific customers or products who can view them. If you select rules to showcase everyone, then you have to limit specific products from the countries that use rule management or product-level settings.
The same process goes for the add to cart button; if you want to show it, then you have to restrict specific products for specific countries using product or rule-level settings.
4. Conceal Payment Method
By navigating to the payment method setting from the general setting of the WooCommerce Restrict Payment Method plugin, you can easily show or conceal the payment method for specific individuals based on geo locations.
Once you head to the payment method section, you will be able to see various options to enable you to want, like:
- Direct bank transfer
- Check payment
- Cash on delivery
5. Manage Payment Visibility by Product Level
Using this plugin, you can easily hide the add to cart button and price for specific countries you want. But if you want to conceal the whole products in your store, then you have to use rule-based management to hide all products easily. A few options are available on product-level settings through which you can effortlessly manage the payment.
Following are some options you can manage payment visibility by product level:
- Choose a specific country
- Select to conceal process & add to cart button
- Add a custom message in replacement of the price
- Replace add to cart with a personalized message
You can also replace the button with a URL or have the option to replace it with no other option.
6. Manage Payment Visibility in Bulk
Managing payment visibility in Bulk using rule-based management is quite easy by creating and adding rules for customers. You can generate rules to conceal the add to cart button, product, and prices. Restricting these all are based on country. Along with this, the plugin allows you to create various rules to customize distinct payment visibility options for different countries. The country restrictions on payment hiding prices, and add to cart buttons are explained in detail below.
- Country-Based Product Restriction
Using a few customized options, you can create new rules and manage them for product restriction in a simple process. Below are the options to hide the product based on country:
- Create rule title
- Select specific country
- Restrict selected products
- permit to showcase or conceal product
- Choose individual categories, products, or product tags
- Customize limitation message type
- Redirect to the internal page
- Redirect to a custom URL
- Showcase a custom message
There are two cases of show and hide-in country-based payment restrictions. One is if you select to show, then the specified product will be visible to the countries you have selected, and the remaining products will be hidden. But if you opt to hide, then the products will be hidden in the selected country but will be visible to the remaining.
- Hide Price & Add To Cart Button
Creating a new rule and managing it to the add to cart button or price have a few similar steps to restricting country-based payment.
- Create rule title
- Select specific country
- Restrict selected products
- Permit to conceal price & add to cart
- Choose individual categories, products, or product tags
- Conceal add to cart by replacing it with
- Custom button and link
- Insert a custom text
- Hide the price by replacing the custom text
Method 2: Restrict Payment Using A Custom Code
Restricting payment methods on the stores for customers with different countries and locations using a custom code becomes a bit tricky as compared to the plugin process. But using a custom code, it is also possible to restrict payment based on country in your store.
Following is the code that will work for your store to restrict payment methods.
add_filter( ‘woocommerce_available_payment_gateways’, ‘bbloomer_payment_gateway_disable_country’ );
function bbloomer_payment_gateway_disable_country( $available_gateways ) {
if ( is_admin() ) return $available_gateways;
if ( isset( $available_gateways[‘authorize’] ) && WC()->customer && WC()->customer->get_billing_country() <> ‘US’ ) {
unset( $available_gateways[‘authorize’] );
} else {
if ( isset( $available_gateways[‘paypal’] ) && WC()->customer && WC()->customer->get_billing_country() == ‘US’ ) {
unset( $available_gateways[‘paypal’] );
}
}
return $available_gateways;
}
Conclusion
To summarize, setting restrictions on payment based on the country is important for your online store. Limiting payment to a country provides an enhanced online shopping experience for customers, and it helps boost your payment options with distinct customer locations.
You have two options for which restriction is possible: one is coding, and another is plugin. Opting for the plugin simplifies the process of limitations without any need for the technical person. You install and customize the rule according to your wants and needs. The plugin allows you to customize country, payment, and product visibility and also helps you conceal, hide, and add-to-cart buttons through different customized options. With country-based product restrictions, you have the option to select specific countries and exclude them from your store. These customized features of the plugin give you a chance to boost your shopping store and build trust.
Make your customers feel satisfied while shopping at your online store & make your business website look more impactful by using the plugins, which will attract more customers and increase sales.