How to Add Country Based Website Switcher For WooCommerce

Country based website switcher

WooCommerce Currency Switcher plugins offer store owners an amazing opportunity. WooCommerce has made it incredibly simple to run a successful online store and sell to customers all over the world. For a store owner selling internationally, currency exchange is one of the more worrying aspects; hence, If you want to expand your online store by selling to different countries, these plugins can be a great help. There is no need to create a new website for a new currency. Your current store may be compatible with using a currency switcher plugin if it supports multiple currencies. Moreover, if you already sell to multiple countries, these plugins can prove to be valuable resources to enhance customer experience. By allowing customers to pay in their own currency, customer satisfaction would increase. Using a currency switch plugin, you can easily manage a problematic aspect of your international store.

Country Based Website Switcher For WooCommerce – Methods

There are two methods by which we can add Country Based Website Switcher for WooCommerce. These include: 

  • Country Based Website Switcher For WooCommerce by KoalaApps
  • Add Country Based Website Switcher For WooCommerce Programmatically

Method #1: Country Based Website Switcher For WooCommerce by KoalaApps

The WooCommerce Country Based Website Switcher plugin directs customers to pages that are tailored to their location via a configurable pop-up or an automatic redirect. This is an essential plugin for retailers who operate multiple WooCommerce stores in different countries. Customers can use WooCommerce Country Switcher to stay on the current website or navigate to the website or online store that is specific to their country. Customers can continue on the current website or navigate to the country-specific page by using a popup or an automatic redirect..


  1. To install this plugin, navigate to your WooCommerce account and download the .zip file.
  2. Go to Plugins in the WordPress Admin Panel and select Add New. Then, upload the plugin.
  3. Select file you downloaded.
  4. Select the Install Now option and then Activate the plugin.

Setup and Configuration

After installing the plugin, look for “Country Selector” under WordPress Admin > WooCommerce. Access complete settings here.

General Settings

The below mentioned options can be controlled from the general settings tab.

  • Enable/disable plugin for the country selector
  • Set the cookie lifetime option to enable or disable it
  • Use the textbox to specify the cookie’s lifetime in days before it expires
  • Add the default website URL to the popup for redirection
  • Turn on the Force Redirect pop-up
  • Set the timer for the Force Redirect pop-up to 0-60 seconds. If you want to redirect users to a relevant country-based website without displaying a popup, set the timer to 1 second
  • Users who are logged in should not be redirected
  • Turn on the switcher popup
  • Display a switch button anywhere on your website using shortcode {country_name}. When you click the switch button, a list of countries for which you have specialized websites will be displayed
  • Add an icon to appear alongside the website switcher button
Country Based Website switcher

Continents Specific Website Switcher

You can enable continents to display countries from the same continent in the country’s tab from the continents tab. For example, if you have a personalized country-based website for only the European region, you can enable only European countries in the “Country” Tab.

Country Based Website switcher

Countries Specific Website Switcher

To redirect users based on their location, you can add URLs for each country. When a user visits your website, the extension will redirect or display a popup to direct the user to his country’s website.

Country Based Website switcher

Show Customizable Pop-Ups

WooCommerce Country Switcher allows you to display attractive and customizable pop ups or lead customers to a website specifically designed for their country. 

Navigate to the “popup” tab to access the popup settings.

  • Enable/Disable the popup
  • Enable the checkbox to always show the popup unless the user chooses to close it, stay on the current website, or navigate to a country website
  • Check the box to hide the Popup from logged-in users
  • Choose a layout for the popup from the pulldown menu, which displays two options:
    • First template: redirect popup
    • Second template: A list of countries from each continent.
  • From the pull-down tab, choose the position of the Popup window:
    • Center
    • Top
    • Bottom
  • Set the font size for the text in the Popup
  • Enable header text and enter your own title
  • Personalize the popup body text elements
    • Change the text that appears before and after the country name in the popup
    • Use the keyword country name to display the user’s country name
    • Customize the text that appears after the country name in the popup
    • Customize Country Text takes the user to the country’s website
    • Customize the text that appears on the Visit Country Site or Visit International pages. To display the user’s country name on the button, use the keyword country name
    • Customize the text that appears on the Stay International or Stay Country websites
  • Enable/disable the footer in the Popup
    • Customize the text in the Popup footer
Country Based Website switcher

Show Customizable Pop-Ups For Redirection

The extension includes a separate popup that will automatically redirect users to country-specific websites. The following redirect popup settings can be customized:

  • Enable the redirect popup to appear when the redirect option is enabled in the general settings
  • Check the box to show the country flag
  • Customize the redirection Notice Text: Inform the user that their country has been detected, and use the keyword {country_name} to display the user’s Country name.
  • To redirect users to their specific country page, add a custom label to the Visit Shop button.
  • Customize the Redirect Text and use variables to display the redirect time [redirected_seconds]. Your general settings are used to calculate the redirect counter time
  • Configure the cancel and go to buttons
Country Based Website switcher

Country Selector Pop-Up

With our extension, you can create a country listing page that displays all of your websites created for different countries.

  • Use the shortcodes to display a country list on any page
  • Change the appearance of the Continent Selector
    • List View
    • Drop Down
    • Place Next to Each Other
  • Enable the use of continent map images on the page
  • Copy the image URL to add custom continent map images
  • Enable the display of country maps alongside each country name, and select the layout
    • Circle
    • Square
    • Default
Country Based Website switcher


The styling tab lets you change the colors and opacity of the default and redirect pop ups.

Default Pop-Up Style

  • To allow or disallow custom styling, enable or disable the Custom Color checkbox.
  • Customize the background color
    • Set the background color
    • Set the overlay color
    • Set the background color opacity
  • Colorize the Close Button
  • Create a popup Button Color of Text
  • On the Switch Button, change the color of the text.
Country Based Website switcher

Redirect Pop-Up Styling

  • Enable Set Redirect Popup Styling 
  • Enable/Disable Redirect Popup Background Color 
  • Custom color styling for Notice Text
    • Set Notice Text, text color 
    • Set Notice Text, background-color
  • Enable/Disable Text custom color styling can be found at Shop Text.
    • Set Visit Shop Text, text color Set 
    • Visit Shop Text, background color 
  • Enable or Disable Custom color styling for redirect text
    • Set Redirect Text and Text Color 
    • Set the Background-color Redirect Text
Country Based Website switcher

Method #2: Add Country Based Website Switcher For WooCommerce Programmatically

Let’s take a look at the program based version of Country Based Website Switcher for WooCommerce.

add_action( 'woocommerce_init', 'ka_cs_switch_web');
function ka_cs_switch_web(){

$user_country          = wc()->customer->get_billing_country();

if (empty($user_country)) {
    $geo_data          = WC_Geolocation::geolocate_ip();
    $user_country       = $geo_data['country'];


if ( !empty($user_country)) {

    $country_url               = '{path to country url}';
    wp_redirect( $country_url );


Final Note

We hope that this article has provided you all the necessary information that you need to download and configure the plugin. However, if you have any further queries you can always contact our support team.

Sign up to get Latest Updates

For more digital insights, sign up for the latest updates and industry news right in your inbox.