Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client needs to configure their WooCommerce store to restrict billing and shipping addresses to Slovakia only on the Slovak domain (imedical.sk), and to the Czech Republic only on the Czech domain (imedical.cz). They are using WPML for multilingual support and have different domains for each language.
Solution:
If you're experiencing this issue, we recommend the following steps:
1. Navigate to WooCommerce -> Settings -> General -> Sell to specific countries, and select the countries you'd like to sell to in the default language.
2. Go to WPML -> String Translations.
3. At the bottom of the String Translation table, click on "Translate text in admin screens."
4. Search for

woocommerce_specific_allowed_countries

&

woocommerce_specific_ship_to_countries

.
5. If found, select and add them by clicking the "Add to string translation" button.
6. Return to the String Translations page and translate the string by adding the language code for the country you'd like to restrict.

This solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If this does not resolve your issue, please open a new support ticket at WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Our next available supporter will start replying to tickets in about 5.67 hours from now. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Shekhar Bhandari 2 months, 1 week ago.

Assisted by: Shekhar Bhandari.

Author Posts
September 9, 2024 at 5:15 pm #16158135

miroslavN

Background of the issue:
I have a WooCommerce store with WPML for multilingual support. I need to configure the following: On the Slovak domain (imedical.sk), I want to restrict the billing and shipping address to Slovakia only. Users should not be able to enter addresses from other countries. On the Czech domain (imedical.cz), I want to restrict the shipping and billing address to Czech Republic only. Again, users should not be able to select any other country. I have set up WPML to use different domains for each language, but I am struggling to configure WooCommerce to limit the available countries for billing and shipping based on the domain.

Symptoms:
I am struggling to configure WooCommerce to limit the available countries for billing and shipping based on the domain.

Questions:
How can I restrict the billing and shipping address to Slovakia on the Slovak domain (imedical.sk)?
How can I restrict the billing and shipping address to Czech Republic on the Czech domain (imedical.cz)?
How do I configure WooCommerce to limit the available countries for billing and shipping based on the domain?

September 10, 2024 at 4:41 am #16159195

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hi there! 🙂

Welcome to WPML support. I'd be happy to assist you with this.

Although WPML doesn't have a built-in feature to restrict addresses based on specific languages, I can offer you a potential workaround. Please note that this hasn't been tested.

- Navigate to WooCommerce -> Settings -> General -> Sell to specific countries, and select the countries you'd like to sell to in the default language.

- Then, go to WPML -> String Translations.

- Scroll to the bottom of the String Translation table and click on "Translate text in admin screens."

- Look for the relevant strings by searching for woocommerce_specific_allowed_countries & woocommerce_specific_ship_to_countries.

- If you find them, select and add them by clicking the "Add to string translation" button.

- Return to the String Translations page and translate the string by adding the language code for the country you'd like to restrict.

Let me know if this helps.

Thanks!

September 10, 2024 at 4:29 pm #16162881

miroslavN

Hi,
perfect 🙂

But I did not find woocommerce_specific_ship_to_countries, but it just enough to set woocommerce_specific_allowed_countries .

Thank you