Background of the issue:
I am using WooCommerce Multilingual & Multicurrency with WPML on my site hidden link. I have activated two currencies: euro and dollar, which change according to the customer's location. In Europe, we use euro prices, and for the American market, we use dollar prices. We use MaxMind Geolocation as a supplement for geolocation.
Symptoms:
Occasionally and randomly, prices in Europe are shown in dollars. The issue is resolved when I clear the cache.
Questions:
Is there a chance to figure out where the error comes from?
Unfortunately, simulating this kind of error on a staging environment is rather not easy, as the error happens quite occasionally.
The picture was take this morning in Munich, Germany.
Before one of my colleagues gets this ticket assigned, I would like to ask you to deactivate any cache memory plugin or functionality and check if the issue disappeared. On our side, we will need to be able to reproduce at will to isolate the cause and find a solution. A recommended way is to create a staging site with a copy of the live site and then leave the site in a minimal setup (a default WordPress theme, the WPML plugins, and Woocommerce) if the issue disappears, start by activating the theme and then the rest of the plugins, one by one, until the issue appears again and you find the culprit.
Please provide the results of your test so my colleague can continue working from there.
So I tried to recreate the same environment using WP Staging and I have disabled all the plugins to check if one is messing up something but the problem occurs even if only WooCommerce and WPML are enabled. I have noticed today on the live version that prices and the value of vat differ from the native language (DE) versus the secondary language (EN). When I clean the cache everything runs perfectly.
I am testing our store in the US and noticed that we have the same problem.
The main page of the store shows prices in dollars for a couple of seconds, as it should be, and then brings them up in euros.
In some cases I see that the VAT to change as well.
When I then move to the check-out page, everything works correctly and the prices are shown in dollars.
I've taken over this ticket and would be happy to assist you in this matter.
The issue you're having typically happens if the currency is cached by the optimization plugin active on the site. Since an optimization plugin is enabled on your site(WP Fastest Cache), the cached version may be preventing the currency from updating correctly. Please try adding these cookies to the plugin's cache exclusion list to see if that resolves the problem:
To understand the process of excluding cookies in the WP Fastest Cache plugin, please check this article: hidden link
Once the cookies are added to the exclusion list, clear the caches from the site and browser, and then check again. Please note that it might take some time for these changes to take effect. I hope it will help.
Please give it a try and let me know how it goes. I'll be happy to help if you need further assistance in this matter.
Thanks a lot for your answer and support.
I added the cookies and I am going to test in the next days if everything works correctly.
When you say that it takes time, what you mean? Are we talking about hours, days?
I tested how our site looks in the US.
The main shop page shows the prices in dollars, as it should be.
The product page though changes from dollars to euros.
There is a specific case, where we have a product on offer. The standard price is shown in dollars, the discounted price in euros.
After adding the cookies to the cache exclusion list, it may take several minutes to hours for the changes to propagate. However, clearing the cache can sometimes show the effects immediately.
However, I reviewed the specific product you shared and noticed that the currency initially loads in USD when viewed from a U.S. location, but then switches to Euros after a moment. Upon inspecting the scripts in the browser's developer tools, I found that a script from the "B2B Market" plugin is causing this switch to Euros. Additionally, when the currency is set to Euro, this script also alters the placement of the Euro icon.
When I blocked this script from loading in the browser, the currency remained consistent in USD without any changes. Please see the attached screenshot for reference.
If there are any active settings within the B2B Market plugin related to currency or pricing, could you please disable them and check again? Since a specific script from the plugin is affecting the currency icon, you may also want to reach out to the B2B Market plugin support team. Explain the issue and share the details, as they might have suggestions to help resolve it.
I hope you can understand. Feel free to let me know if you need further assistance in this matter. I'll be happy to help.
Reaching out to the B2B Market support is a great step forward! Please feel free to update this thread with any insights or solutions you receive, as it will definitely be valuable for other users experiencing similar issues.
I’ll keep an eye on this thread as well, in case further assistance is needed.
Best regards,
Prosenjit
The topic ‘[Closed] Wrong currencies using WooCommerce Multilingual & Multicurrency’ is closed to new replies.