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.
Tagged: Custom Work, Documentation request, WCML
Related documentation:
This topic contains 3 replies, has 2 voices.
Last updated by Mateus Getulio 1 year, 7 months ago.
Assisted by: Mateus Getulio.
Author | Posts |
---|---|
July 20, 2023 at 12:36 pm #14072247 | |
jakobM-4 |
Hi Is there a way to restrict billing and shipping country based on selected language? I have 4 languages installed (Danish, Swedish, Norwegian and English) For English I want to disable Denmark, Sweden and Norway. How would I do this? |
July 20, 2023 at 8:56 pm #14075109 | |
Mateus Getulio Supporter
Languages: English (English ) Portuguese (Brazil) (Português ) Timezone: America/Sao_Paulo (GMT-03:00) |
Hi there, Thank you for contacting the WPML support! Currently, WPML does not support an option to change the billing or shipping country based on the language selected. You can consider using the Maxmind Geolocation feature of WooCommerce to set the customer location automatically and display shipping methods based on the location. You can check more info on the following documentation https://woocommerce.com/document/maxmind-geolocation-integration/. Looking forward to your reply. Thank you. Regards, |
July 21, 2023 at 2:44 pm #14080781 | |
jakobM-4 |
Hi Matues Thank you for your reply. It really has nothing to do with shipping options. The reason I need this is to prevent customers from eg. Norway placing an order on the Danish language page. Our pricing is different from the Danish page compared to the Norwegian. Is there a way to disable billing and shipping countries on the specific language versions? So disable all countries but Denmark on the Danish page, all but Norway on the Norwegian etc? Thanks for helping out. |
July 21, 2023 at 7:46 pm #14081963 | |
Mateus Getulio Supporter
Languages: English (English ) Portuguese (Brazil) (Português ) Timezone: America/Sao_Paulo (GMT-03:00) |
Hi there, Thanks for the clarification and sorry about the misunderstanding. This functionality is not available natively in WPML, I'm afraid. I double-checked it and currently we don't have a specific hook for what you're trying to achieve: https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/ It would be necessary to configure it with some code customization. At this point, this is beyond the scope of this support forum, but we recommend that you check our contractors page: https://wpml.org/contractors/. Another option would be to use a specific plugin that offers a similar feature. You could try this one, for instance: https://wordpress.org/plugins/woo-product-country-base-restrictions/. DISCLAIMER: Note: the possible solution provided is to be used just as an informational one. Please remember that custom coding is out of the scope of our support, so we can't create, debug or modify code for you and it's your responsibility to maintain it. We hope the one we used as an example could point you in the right direction. Please check our support policy: https://wpml.org/purchase/support-policy/ Thanks for your understanding. If you need anything else don't hesitate to contact us. |