Skip Navigation

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

Problem:
The client is trying to auto-detect user location and show pricing accordingly using WooCommerce's GeoLocate. They are also using WP Rocket for caching. The issue is that the home page shows incorrect currencies, and only after some hard refreshes does it show the correct currency.
Solution:
1. We asked the client to provide debug information by following this documentation: https://wpml.org/faq/provide-debug-information-faster-support/.
2. We recommended testing the feature without WP Rocket by clearing the WP Rocket cache and deactivating it, then clearing the browser cache and testing the result.
3. We reminded the client that WooCommerce Multilingual only supports MaxMind Geolocation and that they need to acquire the proper key, as detailed in our documentation: https://wpml.org/documentation/related-projects/woocommerce-multilingual/multi-currency-support-woocommerce/#currencies-per-location.
4. The client found a solution by using a WP Rocket extension that handles cookies with high accuracy, which resolved the issue: https://docs.wp-rocket.me/article/1313-create-different-cache-files-with-dynamic-and-mandatory-cookies#helper-plugin.

If this solution doesn't look relevant to your issue, please open a new support ticket here: 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.

Tagged: 

This topic contains 7 replies, has 3 voices.

Last updated by Shekhar Bhandari 1 year, 3 months ago.

Assisted by: Shekhar Bhandari.

Author Posts
December 22, 2023 at 7:33 pm #15121633

cameronC-5

Tell us what you are trying to do?
- i am trying to auto detect user location and show pricing accordingly , for auto detect i am using woocommerce's GeoLocate and i also have wprocket on my site. currently i am facing issue on my home page only as i already exclude WCML Cookies From Cache but Instead of this Home page shows Wrong Currencies After Some Hard Refresh It Show correct.

Is there any documentation that you are following?
- Nill

Is there a similar example that we can see?
-Don,t Know

What is the link to your site?
hidden link

December 23, 2023 at 3:41 pm #15122695

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

I will add the first reply before this ticket is assigned to one of my colleagues.

Would you please provide us with the debug information?

https://wpml.org/faq/provide-debug-information-faster-support/

As a first step, please test if the feature is working without WP Rocket in the first place or not.

To do so, please clear WP Rocket cache and deactivate it.

Clear your browser cache and test the result.

Finally, the Woocommerce Multilingual plugin only supports MaxMind Geolocation which you need to acquire proper key for.

Please check the documentation below for more information:

https://wpml.org/documentation/related-projects/woocommerce-multilingual/multi-currency-support-woocommerce/#currencies-per-location

Thanks.

December 24, 2023 at 11:42 am #15123719

cameronC-5

Yeah i've tried without cache and wp-rocket, and it works fine without cache, but i need to cached my site with help of wp-rocket to make my site fast, so i need multicurrency feature to be working with wp-rocket,

Currently i'm using WCML as stand alone as i didn't configure WPML yet, so couldn't get that debug information,

yes i'm using MaxMind Geolocation and i've the key setup properly.

December 25, 2023 at 12:52 pm #15126329

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello Cameron. 🙂

I'll be guiding you through the resolution of this issue.

I would need to check your site settings once to check the issue further, in the meantime, I suggest you to consider contacting wp-rocket too to see if they have any suggestions.

I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

December 26, 2023 at 2:43 pm #15130378

cameronC-5

any update, BTW the issue with multi-currency is only on the homepage.

December 27, 2023 at 2:45 am #15131031

Shekhar Bhandari
Supporter

Languages: English (English )

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

Hello there,

I am still checking the issue and the settings look correct, I would need your permission to disable/enable themes/plugins on your site.

Further, did you ask for help from the wp-rocket team?

Look forward to your reply.

Thanks

December 27, 2023 at 11:52 am #15131935

cameronC-5

Hi yesterday upon research, i found the solution and the solution is from wp-rocket, they provide tow extensions to their plugin to handle cookies, and to exclude cookies with high accuracy, and upon installing the extension (hidden link), so it's resolved now, i'll get back to you if it make any problem upon moving to live site. Thank you.

December 27, 2023 at 1:24 pm #15132181

Shekhar Bhandari
Supporter

Languages: English (English )

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

Glad to know that, update here once you complete the tests on live site.