CodeCanyon WordPress Country Selector - WordPress Plugin
The plugin offers the functionality of redirecting users to the appropriate language of a WordPress site based on their location. Its seamless integration enhances the user experience by automatically displaying content in the user’s preferred language, boosting engagement and usability. The plugin streamlines the process of language selection, ensuring visitors are directed to the most relevant version of the site effortlessly. By leveraging geolocation technology, it simplifies the localization process for website owners, making it an invaluable tool for multilingual websites.

Plugin Features
Enhancing the overall user experience, the plugin provides a user-friendly interface for easy configuration and customization. Website administrators can effortlessly set up and manage language redirects without the need for complex coding. The intuitive controls allow for quick adjustments to suit the sites specific requirements, providing flexibility and convenience in language management. This feature-rich solution empowers site owners to cater to a global audience effectively, catering to diverse linguistic preferences seamlessly.
One of its key advantages is the ability to automatically detect users locations and direct them to the most relevant language version, eliminating the need for manual selection. This automated process saves time for both users and site owners, ensuring a smooth browsing experience for visitors from various geographical regions. The plugins intelligent mechanism enhances accessibility and ensures that users are presented with content that resonates with their language preferences, fostering engagement and facilitating interaction with the site.
Additionally, the plugin offers extensive compatibility with various WordPress themes and plugins, ensuring seamless integration with existing site functionalities. Its robust architecture and efficient performance make it a reliable solution for websites of all scales, from small businesses to large enterprises. With regular updates and enhancements, CodeCanyon WordPress Country Selector stays current with evolving web standards, providing a reliable and future-proof solution for language redirection needs.
In summary, the plugin revolutionizes the language localization process for WordPress websites, providing a sophisticated yet user-friendly solution for directing users to the appropriate language version. Its advanced features, seamless integration, and automated functionality make it a must-have tool for website owners looking to enhance the multilingual capabilities of their sites. With its intuitive controls and efficient performance, the plugin offers a comprehensive solution for delivering personalized and engaging user experiences across diverse linguistic demographics.
Setup and Validation Guide for CodeCanyon WordPress Country Selector
CodeCanyon WordPress Country Selector is not just for displaying a nice flag picker. In a proper international site structure, it connects the visitor's country, the correct local URL, a popup prompt that suggests switching to the appropriate site version, and a country selection page where the user can override the automatic detection. In this guide, we'll walk through how to prepare your site, enable the main modes, configure countries, shortcodes, the widget, the popup, forced redirects, and diagnostics.
This guide is written for a site owner, webmaster, or developer who already has the plugin ZIP archive and wants to deploy it safely on a WordPress site. We will not repeat the short product card or cover the purchase and licensing workflow. The focus here is on practical setup, validating the result, common mistakes, and the cases where automatic country detection is better replaced with a clear user choice.
Pay especially close attention to the sections on exact URL matching, cookie lifetime, site language, shortcodes, and the ?country=debug mode. These are the areas that most often determine whether CodeCanyon WordPress Country Selector actually helps visitors or creates an annoying repeated popup, the wrong flag, an empty country selection page, or an endless redirect loop.
When the Plugin Actually Solves an International Site Problem
A country selector is useful when a site already has multiple localized versions and visitors regularly land on the wrong one. That could mean separate domains, subdomains, or sections like /de/, /fr/, or /us/. The plugin helps show the visitor that a better page exists for their country and gives them a controlled way to switch instead of silently guessing.
The main use case for this product is guiding a visitor to a country-specific page without making it feel like the site "kicked" them onto a different version. In its official materials, weLaunch describes two main approaches: a popup where the user can switch or stay, and automatic redirection when business logic requires it. There is also a separate country selection page with flags, a map, continents, and multiple display options.
A good example is an online store where product selection, shipping, taxes, currency, or legal text differ by country. If someone from Germany lands on the international page, you can suggest the German section. If the site does not have a German section, it is better to show a clear fallback such as the international page instead of trying to redirect to an empty or non-existent URL.
The plugin can also be useful for content-driven sites. For example, a brand may have separate local versions with different contacts, dealer locations, support languages, and regional policies. In that case, the country selector acts as a navigation layer on top of the existing structure rather than a content translator. This is an important distinction: the plugin does not create translations and does not replace a full multilingual architecture.
Where it works best
- The site already has dedicated country pages, sections, subdomains, or domains.
- You want to suggest a local version while still letting the visitor stay on the current page.
- You need to display a country selection page using the
[wordpress_country_selector]shortcode. - You need to add a country dropdown or switch link to the menu, header, footer, or widget area.
- You need to configure a fallback URL for countries that are not covered by separate local versions.
When the product may be unnecessary
If your site only serves one country and one language, a country selector just adds another layer. If your local URL structure is not ready yet, first clean up your country pages, menus, SEO-friendly URLs, canonical links, and internal navigation. If you need to change content inside a single page based on city, user role, ad campaign, or cart behavior, you should look at conditional content and geotargeting rather than relying only on a country selector.
Practical check: before installation, write down every country and the exact URL where the visitor should land. If that URL map is not ready, plugin setup will quickly turn into guesswork.
How the "Country - URL - User Choice" Flow Works
The logic in CodeCanyon WordPress Country Selector revolves around several entities. First, the plugin needs to determine the visitor's country or identify which language/locale is associated with the current site. It then compares that information against the country table, where the administrator has assigned a URL for each country. From there, several outcomes are possible: show a popup, perform a redirect, display the selection page, or do nothing if no suitable address exists.
The settings include a default country URL. This is the fallback address used when the visitor's country is not covered by a local version. In practice, it is often used as the international page, the global domain, or the main site. This setting becomes especially important when visitors come from countries where the business does not yet have a dedicated site. Without a fallback, the user may never see a useful suggestion, and with a sloppy setup, automatic redirects may send them to the wrong place.
Another key element is the cookie. After the user makes a choice, the plugin needs to remember it so the same popup is not shown on every page. weLaunch documentation notes that cookie lifetime is configured in the general settings, and a value of 0 means the popup appears on every visit. For a real production site, that is almost always too intrusive, so the cookie lifetime should match how often people are expected to return.
Three modes you should not combine blindly
The popup, the selection page, and automatic redirect solve different problems. A popup works well when the user should make the decision themselves. The country selection page is useful as a persistent navigation point where a person can manually choose a country. Force redirect only makes sense when business rules require users to be sent automatically to a local page, and you have already confirmed there are no loops.
| Scenario | When to use it | What to verify |
|---|---|---|
| Popup | You need to suggest a local version while preserving user choice. | Text, cookie lifetime, buttons, background, color, and behavior after the user declines. |
| Country selector page | You need a page with all countries, flags, a map, or continent filters. | Shortcode, page URL, flag style, continent settings, and populated countries. |
| Force redirect | You need to send the visitor to the correct address automatically. | Exact URL match, delay in seconds, exclusion for logged-in users, and debug mode. |
The short version is simple: configure and test the popup or country selection page first, then move on to automatic redirects. That makes it easier to confirm that the countries are filled in correctly and that the detection logic works before a redirect starts firing without user input.
Preparation Before Installation: URLs, Languages, and a Test Environment
Before installing the plugin, prepare not WordPress as an abstract CMS, but your international structure itself. The plugin works with existing URLs. If those URLs do not exist or conflict with each other, no popup configuration will fix the problem. Start with an inventory: which countries are supported, where each local version lives, which country acts as the international or fallback version, and which pages should be excluded from automatic behavior.
For each address, verify the exact format: http or https, whether www is included, whether there is a trailing slash, the subdomain, and the path after the domain. In its official FAQ about infinite redirect loops, weLaunch specifically says that the URL in the plugin settings must fully match the site's actual URL. A mismatch in http/https, www/non-www, or the trailing slash can cause a redirect loop.
URL verification table
Build the table before installation. You can keep it in a spreadsheet or a document, but one rule matters most: only verified, working, canonical URLs should go into the plugin.
- Country: Germany, France, United States, international version, and other active markets.
- Target URL: the exact address, without extra variants or temporary parameters.
- Version type: domain, subdomain, subfolder, or standalone page.
- Site language: the value under
Settings-General-Site Language, if it matters for the flag and label. - Fallback: the address where visitors from unsupported countries should be sent.
- Test: whether the URL opens in a private window and whether it triggers its own redirect back.
What to verify in WordPress
In WordPress, check Settings - General. Official WordPress documentation describes WordPress Address (URL), Site Address (URL), and Site Language there. For a country selector, these are not secondary fields: they affect the site's base URLs, the admin language, and the locale, and weLaunch has a separate FAQ page about incorrect flags or country names where the cause is tied to the site language.
If you run a multilingual site with WPML, Polylang, or a similar system, do not enable multiple automatic redirect layers all at once. For example, WPML can redirect based on browser language, while CodeCanyon WordPress Country Selector works with country-specific URLs. Those mechanisms can overlap. Without testing, it is easy to end up in a situation where one plugin routes the visitor by language and the other by country, making the final path unpredictable.
Staging and cache
The best option is to configure the plugin on a staging copy or a private test domain first. If you do not have that environment, work during low-traffic periods and keep forced redirects disabled at first. On sites with caching, verify that the popup, the selection page, and the debug response are not being cached in a way that makes different users see the same result. Be especially careful with server-side cache, CDN layers, JavaScript optimizers, and rules that strip query parameters.
Safe sequence: first populate the countries and the selection page, then test the popup in a private window, then set the cookie lifetime, and only after that test force redirect with a delay.
Installation and Initial Validation in the Admin Panel
Installation works like a typical premium WordPress plugin: upload the ZIP archive through Plugins - Add New - Upload Plugin, activate it, and find the Country Selector settings item in the admin panel. Older weLaunch discussions mentioned Redux Framework, but in comments under the setup documentation, the developer clarified that Redux is no longer required and that the weLaunch plugin itself is enough. So if you find an older instruction that mentions Redux, do not automatically install extra dependencies. Check the current documentation and the live interface first.
After activation, do not turn everything on at once. First make sure the settings entry appears, the settings page opens, and the public-facing site does not throw a critical error. Then enable the country selector itself in the general settings, save the changes, and open the site in a private window. If nothing happens, that does not necessarily mean the plugin is broken: the popup may not appear if the visitor's country is not mapped to a URL, a cookie is already stored, the user is logged in, or redirects are disabled.
Initial post-activation check
- Open the admin panel and confirm that the Country Selector settings are available.
- Verify that enabling the plugin saves without errors.
- Create a temporary test country with an exact URL that definitely opens.
- Check the public site in a private window so old cookies do not interfere.
- Do not enable force redirect until countries and the selection page are configured.
- If the popup does not appear, use
?country=debugand inspectshow_popup,target_URL, andusers_country.
What to do if the settings are not visible
If the settings menu does not appear, check the user's role, plugin activation status, and possible conflicts with admin restrictions. Do not start editing plugin files right away. Disable any recently added optimization or security plugins in your test environment, review the PHP error log through your hosting panel, and make sure you are logged in as an administrator. If the menu still does not appear, it is better to gather screenshots and contact the developer's support than to try restoring the menu through manual edits.
Short version: the initial check should answer three questions. Can the administrator see the settings? Do the basic parameters save correctly? Does the public site return the expected popup or debug data? Until all three answers are yes, do not move on to automatic redirects.
Detailed Post-Install Configuration: From General Settings to the Popup
The main setup for CodeCanyon WordPress Country Selector is split across several panels: general settings, continents, countries, the country selector page, popup/modal, and advanced settings. weLaunch documentation presents the workflow in that order. That sequence is practical in real use as well: enable the logic and cookie first, then assign countries, then decide how the user will see the choice, and only at the end adjust styling or CSS.
General settings
The general settings are where you enable the plugin, set the cookie lifetime, define the default country URL, turn on force redirect, and set the redirect delay. For a typical site, it is best to start with the plugin enabled, a clear default URL, and a moderate cookie lifetime. A cookie value of 0 is only convenient for testing because it forces the popup to appear every time. On a live site, that quickly becomes irritating and makes it harder to evaluate real user behavior.
Only enable force redirect after manual validation. If you need automatic redirection, set a small delay. That gives you time to stop the load, open developer tools, or observe the popup behavior before the browser jumps to the target URL. For logged-in users, editors, and administrators, it is often helpful to temporarily disable redirects or test in a separate browser so the site remains manageable while you work.
How to choose cookie lifetime
If the site is visited infrequently, you can set a longer duration so the user does not see the popup every time they come back. If your country structure changes often, you can shorten the duration, but do not reduce it to the point where the popup feels constant. During testing, use a short lifetime temporarily or clear cookies manually. After testing is complete, restore the production value and verify a repeat visit.
Continents and countries
In the continents panel, you can enable or disable grouping on the selection page. weLaunch documentation and comments show that if someone wants to remove a heading like Americas, the answer is in the continent settings. That is useful for a small site with only two or three countries, where continent labels may feel unnecessary. For a large country catalog, by contrast, continent filtering helps keep the selection page from turning into one long list.
The countries panel is where you assign country URLs. Countries are grouped by continent, and the same URL can be used for several countries if that matches your actual setup. For example, a German-language section might serve Germany, Austria, and Switzerland, but only if that is truly your structure rather than a temporary guess. Do not assign one generic URL to every country if you then plan to enable force redirect, because at that point the redirect stops being useful.
The exact URL rule
Enter addresses exactly as they should exist in the browser after all redirects have finished. If WordPress or your CDN automatically normalizes the address to the www version, that is the version that belongs in the country table. If the site removes the trailing slash, do not include it in the country URL setting. That level of precision directly reduces the risk of an infinite redirect.
Country selector page
The country selector page is built with the [wordpress_country_selector] shortcode. Create a regular WordPress page, insert the shortcode into the content, publish the page, and enter its URL in the plugin settings. Then choose the page style: side-by-side display, list, or dropdown, if that option is available in your version. Decide separately whether to show flags, use a round or simple flag style, display the country map, and enable continent filtering.
This page matters even if you use a popup. It gives the user a fallback path: if they close the popup, make a mistake, happen to be near a border, use a VPN, or want to switch countries manually, they do not need to clear cookies or hunt for a footer link. They can simply open the selection page and choose the correct destination.
Popup and modal
The popup should be short, calm, and clear. In the settings, you can enable or disable the modal window, choose the popup style, set the size, pick text and background colors, enable the header, body, and footer, and configure the wording. Good copy should not pressure the visitor. It should explain that a local version is available and offer a clear choice to switch or stay.
If the site has a strict visual system, use the built-in color settings and a small amount of custom CSS. Do not modify plugin files. If the popup breaks the theme layout, the advanced settings include an option to disable Bootstrap, which weLaunch explicitly mentions as a fix for theme-related issues. But do not disable it "just in case." Confirm first that the conflict is actually caused by styles.
Advanced settings and custom CSS
It is best to leave the advanced panel until the end. This is where you can add custom CSS and disable Bootstrap if the theme has issues. It is not the place for complex logic, redirect overrides, or behavior rewrites. CSS is appropriate for small visual adjustments: changing the international flag, removing extra spacing, refining popup width, or matching a button to the theme.
After each group of settings, save your changes and test the result in a private window. If you change the cookie, countries, popup, shortcode, and force redirect all at once, it becomes much harder to tell which setting caused the problem.
Selection Page, Menu, and Widget: How to Give Visitors Manual Control
Automatic country detection is never perfect. The user may be traveling, using a corporate VPN, living near a border, opening the site through a proxy, or simply wanting to view a different local version. That is why manual country selection is not just visual polish. It is part of a normal user flow.
CodeCanyon WordPress Country Selector supports several manual-selection options. The main one is the page with the [wordpress_country_selector] shortcode. For a menu or header, the documentation provides the shortcode [country_selector style="dropdown" text="%s - Switch Country"]. For a simple link, use [country_selector style="link" text="%s - Switch Country"]. The %s token is replaced with the current country or page name, and you can remove it if you want a fixed label.
The selection page as a country directory
Create the page with a clear URL, such as /country-selector/ or a local equivalent. Do not bury it too deep. If the site has a footer with service links, add a "Country Selection" item there. If the popup is configured to open the selection page inside a modal when the widget is clicked, test that scenario separately: the link should open the actual country list, not an empty modal area.
On the selection page, visual layout is not the only thing that matters. URL completeness matters too. If a country is not filled in, the user will see an incomplete list. If the flag is there but the link points to the wrong domain, the mistake will be perceived as a site issue, not as plugin configuration. So validate the country list not just visually, but by clicking through several different markets.
Dropdown in the header or menu
A dropdown is useful when country selection should be available on every page. You can insert the shortcode into the menu using theme features, blocks, a widget area, a shortcode block, or a custom HTML block, as long as the theme correctly processes shortcodes. If the shortcode prints as plain text, that placement does not execute shortcodes. In that case, a widget, block, or the theme's native method is the better choice.
Do not place the dropdown next to a language switcher without explanation. The user may not understand that one control changes the country and target URL while the other changes the language of the current page. If both are needed, separate them visually as "Country" and "Language." That reduces confusion and lowers the number of mistaken switches.
Footer widget
weLaunch documentation mentions the Country Selector Dropdown Widget under Appearance - Widgets. This is a good option for themes where the footer is managed through widgets. The widget is less intrusive than a popup and gives users a permanent way to change country. For a store or an international corporate site, a footer widget often works as insurance: the user can return to country selection at any time.
Result check: after adding the dropdown, open a page, choose another country, go back, and refresh. If the selected country is not retained or the link is built as a doubled URL, check the country URL and the place where the shortcode is executed.
Popup and Forced Redirect: How Not to Break the User Journey
The popup and force redirect may seem similar, but from the user's perspective they are opposite modes. The popup asks, while the redirect decides for the user. That is why automatic redirects should be the last setup step, not the first. First make sure country detection, the URL table, the fallback, and the cookie all work correctly.
Three things matter for the popup: when it appears, what it offers, and how it remembers the choice. If the window reappears after a page refresh, the likely cause is a cookie lifetime that is too short or cookie blocking in the browser. In its official FAQ, weLaunch explicitly recommends increasing the cookie lifetime in the general settings and also taking private mode or blocked cookies into account.
Popup copy
The text should explain the action without sounding aggressive. For example: "It looks like there's a local version of the site for your country. Would you like to switch to it or stay here?" Do not promise that detection is always accurate. It is better to give the user a "Stay Here" button and a link to the country selection page. If your version includes separate header, body, and footer settings, use the header for the short reason, the body for the explanation, and the footer for the buttons.
Cookie duration and repeated popups
If a visitor has already declined the switch, showing the popup again on every page feels like a bug. Increase the cookie lifetime, clear cache, and test in both a normal and private window. If the popup appears every time in a private window, that is expected: the browser may not preserve cookies between sessions. Do not try to "fix" that with an aggressive redirect, or users in private mode will lose control.
Delay before force redirect
When using automatic redirection, set a delay if the setting is available. It is helpful not only for user experience, but also for diagnostics. Without a delay, the page may jump to another URL before you can open the console or inspect the debug data. During testing, temporarily disable force redirect or set a value that gives you enough time to inspect the JSON in ?country=debug.
Excluding logged-in users
weLaunch debug output includes the field force_redirect_exclude_logged_in, which shows whether logged-in users are excluded from redirection. If you administer the site, that exclusion is usually helpful: an editor does not need to be sent to a local page every time they try to review content. Still, always run your public-facing tests in a separate browser or a private window, because a logged-in user may not see the same behavior as a regular visitor.
Practical Example: An International Store with Local Pages
Let's walk through a scenario that closely matches the plugin's purpose. Imagine a WordPress store with an international page, a German section, and a French section. The goal is to suggest the local version when one exists, but not force every user into an automatic redirect. The footer should also include a country selection page, and the setup should be validated through debug mode.
Goal
Build a calm, predictable flow: a visitor from Germany sees a suggestion to switch to the German section, a visitor from France sees the French section, and everyone else gets the international fallback or can choose a country manually. The popup should not reappear after every refresh, and the selection page should display only the populated countries.
Preparation
- The international page opens at the exact URL selected as the fallback.
- The German and French versions are published and do not redirect back to the international section.
- The site address and site language have been checked under
Settings-General. - Cache can be cleared, and a private window is available for testing.
- Force redirect is still turned off.
Setup steps
- Open the Country Selector settings and enable the plugin.
- In the general settings, set the default country URL to the international page.
- Set the cookie lifetime to a production-ready value, and during testing use a shorter duration temporarily or clear cookies manually.
- In the countries panel, enter the exact URL for Germany and France. Do not add countries that do not have pages yet.
- Create a WordPress page called "Country Selection" and insert
[wordpress_country_selector]. - Enter that page URL in the Country Selector Page settings.
- Choose the page style: for two or three countries, a list or dropdown is usually simpler than continent grouping.
- Enable the popup/modal and configure short copy with two clear actions: switch or stay.
- Add a country dropdown or switch link to the footer through a widget or the shortcode
[country_selector style="link" text="%s - Switch Country"], if that area supports shortcodes. - Save the settings and clear the site cache.
Expected result
A user from a supported country sees a suggestion to switch to the local version. If they stay, the choice is saved in a cookie, and the popup should not immediately reappear after a refresh. The country selection page shows the populated countries, and each link leads to the correct URL. A visitor from a country without a dedicated version should not be sent into an empty route.
Validation and nuance
Open the site with the ?country=debug parameter. In the console or response, inspect users_country, target_URL, show_popup, is_default, and force_redirect. If target_URL is empty or points to the wrong place, the issue is in the country table or the fallback. If show_popup is 0, check the cookie, login status, and popup mode. If the country is detected incorrectly, do not rush to blame the plugin: IP geolocation can be wrong because of VPNs, mobile networks, or corporate providers.
Example takeaway: manual selection and the popup should work before force redirect does. Only enable automatic redirects after debug shows the correct
target_URLfor several countries.
Validating the Result: Debug Mode, Cache, and Real Browsers
Testing a country selector is different from checking a standard visual block. You need to confirm not only that the popup looks good, but also that the selection logic works across countries, user states, cookies, and cache layers. weLaunch provides a debug mode through the ?country=debug parameter. It returns JSON with keys such as users_url, users_country, users_language, target_URL, force_redirect, show_popup, and other fields.
To open debug mode, add the parameter to the end of the URL: https://example.com?country=debug. Then open developer tools, go to the Console tab, refresh the page, and inspect the formatted JSON. Alternatively, open the Network tab, select the page request, and check Preview or Response. If the redirect fires too quickly, temporarily disable force redirect or add a delay.
What to inspect in the JSON
| Key | What it shows | How to use it during validation |
|---|---|---|
users_country |
The visitor's detected country. | Compare it with the expected country and account for VPNs or a test IP. |
target_URL |
The address the plugin intends to send the user to. | Verify the exact protocol, www, trailing slash, and local path. |
force_redirect |
Whether automatic redirect is enabled. | In testing, it is better to see 0 until the URLs are confirmed. |
show_popup |
Whether the popup will be displayed. | If the window is not visible, determine whether a cookie or settings are suppressing it. |
is_default |
Whether the fallback configuration is being used. | Understand why the visitor did not land on a local page. |
Cache and optimization
Optimization plugins may strip query parameters, cache the response, combine scripts, or change load order. In the official debug article, weLaunch lists server-side caching or a firewall among the reasons the country=debug parameter may fail. During validation, add the parameter to cache exclusions or briefly disable optimization on a staging site.
If the site uses a CDN, check whether the CDN is serving the same HTML to different countries. Country selector logic may run inside WordPress, but a higher static cache layer can still show users stale results. For the popup, this may look like the wrong window state; for redirects, it may appear as repeated odd behavior; for debug mode, it may mean no JSON or outdated values.
Real browsers and private windows
Do not test only in one browser where you are logged into the admin panel. Check normal mode, a private window, and at least one second browser. Keep in mind that private mode may not preserve cookies between sessions, which means the popup will appear more often. That is not necessarily a plugin issue. It becomes a real issue only if the popup keeps returning in normal mode with a reasonable cookie lifetime and without clearing site data.
Safe Improvements Without Editing Plugin Files
There are several safe ways to extend CodeCanyon WordPress Country Selector: CSS for the flag or visual styling, string translation through Loco Translate or WPML String Translation, and a filter for country ordering. All of these approaches are better than editing plugin files directly. After an update, direct edits inside the plugin will be lost and may also break support.
Replacing the international flag with CSS
In its documentation, weLaunch shows a CSS-based approach for replacing the international flag. First upload your own SVG or PNG to the WordPress media library, copy the URL, and add the CSS through the plugin's custom CSS field, a child theme, or the standard Additional CSS area. The example below is intentionally left as a small, reversible change. Replace the URL with your own file.
.flag-icon-un {
background-image: url("https://example.com/wp-content/uploads/international.svg");
}
Validation: open the popup and the country selection page, find the international option, and make sure the new flag appears without stretching. Rollback: remove the CSS and clear cache. Do not replace plugin classes inside its files, because an update will restore the original state.
Renaming "International" or "Stay at United States"
If you need to change a string such as "Stay at International Site," use translation rather than editing PHP. In its FAQ, weLaunch describes the Loco Translate approach: select the WordPress Country Selector plugin, create a language file in a custom location, find the target string, and save the translation. For WPML sites, the developer describes the path through WPML - String Translation after scanning the plugin strings.
This approach is safe because the translation is stored separately from the plugin files. After an update, verify that the string is still covered by translation and that cache has been cleared. If the string does not change, first make sure you are editing the correct site locale. weLaunch has a separate FAQ page about incorrect flags and country names where the cause is tied to the Site Language setting.
Changing country order with a documented filter
weLaunch documentation lists the filter wordpress_country_selector_available_countries_filter, which can be used to change country order or add custom countries. This kind of change should only be made by a developer, in a child theme or through Code Snippets, with a backup and a staging test. Do not invent the array structure if you cannot inspect the current data first. Output the list in a test environment or ask a developer to confirm the format.
add_filter('wordpress_country_selector_available_countries_filter', function ($available_countries) {
// Example of a safe place to sort the country array.
// Check the $available_countries structure on a test site before changing it.
return $available_countries;
});
Validation: after adding the filter, open the country selection page and make sure the list has not disappeared, the flags are still there, and debug mode does not show an empty target_URL. Rollback: disable the snippet or remove the filter. If the goal is only to change visual order, it may be easier to solve it through the continent settings and country entries without adding PHP.
Common Problems and Precise Diagnostics
Country selector issues almost always come down to one of five areas: an incorrect URL, the wrong site locale, cookies, cache, or force redirect being triggered too early. Below is practical diagnostics for this specific type of plugin, not a generic "clear the cache" checklist.
The popup appears again after a page refresh
Symptom: the user selected a country or chose to stay on the current version, but the popup appears again after refreshing or on the next page.
Possible cause: the cookie lifetime is too short, the value is 0, the browser is in private mode, cookies are blocked, or cache is serving an old state.
What to check: the general cookie lifetime setting, behavior in a normal window, presence of the site's cookie, the show_popup debug field, and caching plugins.
How to fix it: increase the cookie lifetime, clear cache, and test in a normal browser. If the problem appears only in private mode, that is not always a site defect.
An infinite redirect starts happening
Symptom: the browser reports too many redirects, or the page keeps bouncing between addresses.
Possible cause: the URL in the plugin settings does not match the site's real URL. weLaunch specifically points to http/https, www/non-www, and the trailing slash.
What to check: target_URL in debug mode, the WordPress canonical URL, hosting redirects, CDN rules, and the country settings.
How to fix it: temporarily disable force redirect, align the plugin URLs with the actual final address after all redirects, then test again with a delay.
The wrong flag or country name is displayed
Symptom: the popup suggests "Stay at United States" even though the site should show Germany, International, or another label.
Possible cause: the country and flag are tied to the site language setting, the string has not been translated, the wrong locale is selected, or the international variant is being replaced through the wrong CSS class.
What to check: Settings - General - Site Language, Loco Translate or WPML translations, the CSS for .flag-icon-un, and the actual flag shown on the country selection page.
How to fix it: configure the site language correctly, add the string translation, replace the international flag with CSS, and clear cache.
The country selection page is empty or incomplete
Symptom: the page with [wordpress_country_selector] opens, but no countries appear, some countries are missing, or the grouping looks odd.
Possible cause: the countries are not filled in, continents are enabled for too small a country set, the shortcode is inserted into a place that does not execute shortcodes, or the wrong page style was chosen.
What to check: the country table, the selection page URL in settings, the shortcode inside standard page content, the continent settings, and the flags/maps options.
How to fix it: fill in at least the working countries, temporarily disable continents, check the page in the editor, and make sure the shortcode is not escaped as plain text.
Debug mode does not show JSON
Symptom: when opening ?country=debug, there is no object in the console, or you only see regular cached HTML.
Possible cause: the parameter was not added to the end of the URL, cache or a firewall strips the query string, force redirect fires before the check, or the console was not refreshed after reload.
What to check: the correct URL, the Console tab, the Network tab, cache settings, and the force redirect delay.
How to fix it: add country=debug to cache exclusions, temporarily disable redirects, refresh the page, and inspect Preview/Response for the page request.
The menu dropdown builds a doubled link
Symptom: the link looks like a merged address, for example the current domain plus the full URL of another country.
Possible cause: the country URL was entered in a format that the theme or menu processes as a relative path, or the shortcode insertion point alters the HTML.
What to check: absolute country URLs, the shortcode output HTML, the menu theme, and whether the dropdown works correctly in a widget or on a standalone page.
How to fix it: use exact absolute URLs, test the shortcode on a normal page first, and only then move it into the menu. If the issue appears only in a custom theme menu, use a widget instead or contact the theme developer.
Compatibility with Multilingual Setups, WooCommerce, Cache, and Theme
Country selector is often installed on sites that already use WPML, WooCommerce, caching, and a complex theme. That is why it is important to understand the product's boundaries. It should not replace a language plugin, it should not handle WooCommerce taxes in place of store geolocation, and it should not fight the cache layer. Its role is to provide country-specific navigation and, when needed, redirect behavior.
WPML and translations
WPML can translate plugin strings through String Translation, and it also has its own browser-language redirect logic. If both mechanisms are enabled at the same time, test the order of operations carefully. The country selector may route by country, while WPML routes by language. For example, a visitor from Switzerland with French as the browser language may expect one path, while the country and language rules point to different versions. In these cases, manual country selection and clear labels are usually safer than stacking multiple automatic redirects.
WooCommerce
For a store, country selector is useful when you have separate country pages, different domains, or regional catalog sections. But WooCommerce itself uses geolocation for taxes and shipping through its MaxMind integration. Do not mix those layers. If you need to show tax rates and shipping methods, that is WooCommerce's job. If you need to suggest a local site or country page, that is the country selector's job.
Be especially careful around checkout and cart pages. Do not enable automatic redirects on checkout pages without separate testing. The user may lose context, and cache or a payment module may treat the switch as a new session. If you need a country selector for a store, start with the popup and the selection page, and leave checkout flow under WooCommerce's control.
Cache and CDN
Static caching is great for performance, but country-based behavior depends on the individual user. If the cache serves identical HTML to every country, the popup may show the wrong target or fail to appear. Some geotargeting systems rely on AJAX-based modes, but within WordPress Country Selector, focus on the plugin's own settings, cache exclusions, and debug mode. Do not exclude the whole site from cache without a reason. Start with the selection page, the debug parameter, and the pages where the popup actually appears.
Theme and Bootstrap
If the popup breaks the layout, check for a CSS conflict. The weLaunch advanced settings allow you to disable Bootstrap when theme-breaking issues occur. Before doing that, take a screenshot, temporarily disable CSS minification, and see whether the result changes. If the issue disappears only after Bootstrap is turned off, keep that setting and document it in the site's maintenance notes. If not, look for the conflict in the theme styles or in a third-party popup or optimization plugin.
Practical Use Cases for Different International Site Structures
The same country selector can behave very differently depending on the site's architecture. One of the most common implementation mistakes is enabling the popup without deciding which international model the site is actually trying to support. Below are several scenarios where CodeCanyon WordPress Country Selector should be configured differently based on the real use case.
Separate country domains
If the brand uses domains like example.de, example.fr, and example.com, the plugin works as a signpost between domains. The country table should contain absolute URLs, and the default country URL usually points to the international domain. In this structure, it is especially important to verify the protocol, www, and trailing slash, because each domain may have its own server-side redirects. If the German domain redirects to https://www.example.de, that final version is the one that belongs in the settings.
For this setup, a popup is usually more appropriate than force redirect. The user understands why another domain is being suggested and can choose to stay on the current version. Automatic redirect is acceptable only after repeated testing: the current domain must not send the user back, the local domain must not show another prompt to return to the international site, and the cookie must preserve the user's choice or refusal.
What to check additionally
- Each country URL opens without an intermediate loop.
- The local domain does not have its own rule that returns the user to the original domain.
- The country selection page is available on the international domain and links to all local domains.
- In debug mode, a visitor from a supported country sees the expected
target_URL.
One domain with subfolders
If the site uses a structure like /de/, /fr/, and /en/, the risk of a redirect loop is usually lower, but the risk of conflict with the language plugin is higher. For example, WPML or another multilingual tool may already control the paths. In that case, the country selector should not act as a second translator. It should function as a hint: "there is a section for your country."
In a subfolder structure, it is useful to make the country selection page visible in the footer. A user may land on the German section from search but want to switch to the international or French section. If you rely only on automatic redirect, that user ends up fighting the site. If you provide manual selection, they can correct the route themselves.
A small site with two countries
With only two countries, you do not need a complex page with continent grouping. Disable continent grouping, keep a simple list or dropdown, and make the popup as short as possible. If you only have international and German versions, for example, continents add visual noise and may trigger questions like "why is Americas here?" That exact question appears in the documentation comments, and the developer's answer comes down to disabling continents in the settings.
In this scenario, the link shortcode in the header or footer often works well. It is less intrusive than a dropdown and still visible enough for a user who needs another version. You can show the popup only on the first visit and then rely on the cookie plus the manual link.
A store with different shipping rules
For a WooCommerce store, it is important not to confuse country selector with shipping logic. The plugin can suggest a local site or regional page, but shipping calculations, taxes, and available payment methods should remain under WooCommerce. If you run separate regional stores, country selector helps direct the visitor to the correct store. If you run a single store with different rules inside one cart, country selector should be treated as supporting navigation only.
Do not enable automatic redirects on cart and checkout pages without separate testing. Even if the settings do not provide an explicit option to exclude specific pages, you can still choose a softer model: show the popup on informational and product pages, keep a country selector widget in the footer, provide a manual selection page, and avoid force redirect in critical parts of the site. If the user is already in the cart, a forced jump can feel like losing the order.
A corporate site with regional contacts
On a corporate site, country selector may lead not to another store, but to a local office page. In that case, the country selection page works well as a region directory: flags, a map, or a list help the visitor find an office, distributor, or contact form. The popup should be phrased gently: "Show local contacts?" instead of "Go to another site."
In this scenario, the default country URL often points to the international contact page. If a country is not covered by a dedicated office, the user still gets a useful destination. That is better than leaving the country empty and showing an incomplete list without explanation.
Scenario takeaway: the country selector should support the international site model you have already chosen. The clearer that model is, whether it is domains, subfolders, store sections, contact pages, or language versions, the fewer confusing settings and strange redirects you will have.
When CodeCanyon WordPress Country Selector Is the Right Choice
The plugin is a strong choice if you already have a clear international structure and need to make it accessible to users. It is especially useful when country-specific URLs matter more than automatic translation: different countries, different domains, different policies, different contact pages, different store versions, or different brand experiences.
Before you download the CodeCanyon WordPress Country Selector archive, verify three things: whether you already have a complete country-and-URL table, whether you know which mode should come first - popup or the selection page, and whether you are ready to test debug mode before enabling force redirect. If the answer to all three is yes, the rollout should be fairly predictable.
If your country structure is not ready yet, do not start with the plugin. First prepare the local pages, configure languages, verify URLs, decide where the fallback should point, and only then connect Country Selector. That way, you are not using the popup to mask an unfinished architecture.
The final test is simple: after setup, the visitor should understand why another country was suggested, where they will go after clicking, and how to return to country selection. If that is true, the country selector is working as useful navigation rather than an irritating popup.
Questions That Come Up When Configuring Country Selector
Can the plugin be used without automatic redirect?
Yes. For many sites, that is actually the best starting mode. Set up the country selection page, the popup, and the cookie first, and leave force redirect disabled until everything has been fully validated. That keeps the user in control and lowers the risk of a redirect loop.
Why does the flag or country in the popup not match the intended market?
Check Settings - General - Site Language, string translations, and country settings. weLaunch notes that the flag and country name can be tied to the site language. If you need the label "International," use Loco Translate or WPML String Translation, and replace the flag through CSS.
How can I test the country without using a VPN?
Use ?country=debug. It shows users_country, target_URL, show_popup, and other fields. It does not replace a real test from another country, but it helps you understand the logic the plugin is currently seeing.
Why does the popup appear every time?
Most often, the cookie lifetime is too short, the value is 0, the browser is running in private mode, or cookies are blocked. Increase the cookie lifetime, test in a normal browser session, and clear cache.
Can country selection be shown in the menu?
Yes. The documentation provides the shortcode [country_selector style="dropdown" text="%s - Switch Country"] for a dropdown and [country_selector style="link" text="%s - Switch Country"] for a simple link. The key point is that the insertion area must actually execute shortcodes.
Is the plugin suitable for WooCommerce?
It works well for sending users to regional store pages or separate store sites. But taxes, shipping, and shopper geolocation remain the responsibility of WooCommerce and its MaxMind integration. Do not treat one as a replacement for the other without testing.
Do I need to edit plugin files to change the text or the flag?
No. Change text through translation tools such as Loco Translate or WPML String Translation. The international flag can be replaced with a small CSS adjustment. Do not edit plugin files, or updates will overwrite your changes.
What should I do if the redirect gets stuck in a loop?
Disable force redirect, check that the URL in the plugin settings exactly matches the site's real address: http/https, www, and the trailing slash. Then validate again through ?country=debug.


