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: WooCommerce Multilingual
Related documentation:
This topic contains 26 replies, has 2 voices.
Last updated by mikaelG-6 12 months ago.
Assigned support staff: Bigul.
Author | Posts |
---|---|
February 6, 2020 at 5:20 am #5436173 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hello, For your kind updates, it looks like the issue is happening because of the custom codes you have added via Code Snippets plugins. The customization code is overwriting the secondary currency values. I am getting the expected results after the following steps. 1) Deactivate Code Snippets plugin Also, the currency conversion rate is also showing the correct value in my local copy. Please check the attached images for more details and let me know your feedback. -- Bigul |
February 8, 2020 at 7:32 am #5451909 | |
mikaelG-6 |
I will try this and see if I can find out what exactly is causing this. It seems strange, as I have been using the same snippets for a long time and it works with previous versions of your plugin. |
February 8, 2020 at 7:59 am #5451929 | |
mikaelG-6 |
Hi. I found the issue for the auto currency conversion not working correctly. I use a code snippet to limit which payment gateways is used depending on language AND currency. This have worked fine until latest update. I disabled only the parts in the code which is related to currency and resaved a product and the amount is now correct. This is the code used that I disabled: // Retrieve the current customer's selected currency And then I use a check for the currency: if ( !in_array( $customer_country, $klarna_enabled_country_codes ) || $current_currency != 'SEK' || $language_code != 'sv' ) { To disable a gateway that only accepts SEK as currency. So these code parts are the reason behind the issue with your latest update. Can you please explain why this is interfering with the prices shown? I haven't found the code snippet responsible for the "," instead of "." in WCML yet. Continues to test. |
February 8, 2020 at 10:13 am #5452059 | |
mikaelG-6 |
Seems the issue with "," instead of "." in currency settings is Browser langauge related. I normally use Firefox for handling the admin area. And it doesn't seem to change anything if I change language in Firefox. But when I tried using Opera, the display of "," changed to "." when I changed browser language. In my opinion, this is something you should change in WCML. As this is a clear distraction and really a problem as I may have been debugging this for a long time if I hadn't tested this. So is there anyway for you to change this to not being language dependent? |
February 8, 2020 at 10:15 am #5452091 | |
mikaelG-6 |
Just to be clear, I didn't change anything in WordPress when using Opera, I just changed language in Opera settings. So if I switched back to Swedish, then the "." changed back to displaying "," instead, just like in FireFox. |
February 10, 2020 at 2:53 pm #5462693 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hello, Thank you very much for the details. I have reproduced the issues in a fresh installation and escalated to our second-tier team for further debugging. We will get back to you as early as possible. Please wait. -- Bigul |
February 13, 2020 at 7:32 am #5483605 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hello, For your kind updates, because of some corrupted entries, the tax calculation was not working fine. That is why the price is showing wrong in USD. We are getting the expected result on our local copies after the following steps. So please try it after a full site backup and let me know your feedback. 1) Go to WooCommerce>>Settings>>Taxes>>Standard Tax -- Bigul |
February 13, 2020 at 7:58 am #5483755 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hello, We have an update on the currency symbol issue when the Browser language is Swedish. This is not a bug. Because the value is not changing for currency rates it will be 0.12 always and we can't enter 0,12 as value for currency rates. So it is only showing value as 0,12 on the basis of browser settings. Please check the attached image for more details. -- Bigul |
February 13, 2020 at 8:54 am #5483945 | |
mikaelG-6 |
Hi Bigul. First of about the tax settings. I didn't have an issue with tax settings. And also I found the cause of the problems with USD prices. Didn't you read post: https://wpml.org/forums/topic/wrong-price-calculation-for-secondary-currency-usd-after-update-to-wcml-4-7-7/page/2/#post-5451929 And about your latest post. I don't really get you point at all here. I also checked the developer console and noticed that the "real" value in that field is indeed "0.12" and not "0,12". But that wasn't my point. The point is your plugin is lying to the user displaying the wrong separator in the currency settings depending on the language used in the browser. Which, as I stated, should be addressed. As you see in your own image, the box to the left is displaying "0,12" and yes I have to type "0,XX" to add a new value. If I try to use "0.XX" there is a red text telling me to input a correct number. So yes, I indeed think it is a bug. As the end-user, aka the shop admins, can be fooled by this behavior and should be possible for you to correct. The must be some way you can force the browser to display the intended separator regardless of language in the browser itself? |
February 13, 2020 at 4:18 pm #5488165 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hello, Thank you for the feedback. I will check it with our team and get back to you. Please wait. -- Bigul |
February 19, 2020 at 11:01 am #5522843 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hello, The issue will be happening because the following code is instantiating the WCML_Multi_Currency class. // Retrieve the current customer's selected currency $get_current_currency_wcml = new WCML_Multi_Currency(); $current_currency = $get_current_currency_wcml->get_client_currency(); Therefore please try the following code instead of it in *WOOCOMMERCE - CHECKOUT - PAYMENT GATEWAYS - Disable Payment gateways depending on conditions* and check you are getting expected result for the Products in English now. $current_currency = get_woocommerce_currency(); Please set *Calculate prices in other currencies automatically* option for the Product variations after the code change, then update products and its translation. Please try it after a site backup and let me know your feedback. -- Bigul |
March 2, 2020 at 12:02 pm #5598815 | |
mikaelG-6 |
My issue is resolved now. Thank you! |