[Resolved] How can we save the previous customer's selected currency?
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is facing an issue where the Viva wallet smart checkout gateway does not support USD payments, and as a result, customers are forced to switch to EURO during checkout. The client wants to save the customer's originally selected currency and display a message with the total price in that currency. Solution: We explained that Viva wallet only supports certain currencies and USD is not one of them. Additionally, WPML does not support the gateway feature for Viva wallet to allow checkout in different currencies such as USD. We suggested that the client reach out to the Viva wallet team for support, as they might provide a hook to convert USD to a supported currency like EUR. Documentation on Viva wallet's supported currencies Furthermore, we acknowledged the client's custom solution using WCML hooks and mentioned that this could be a feature request for our team to consider.
If this solution does not seem relevant to your situation, please feel free to open a new support ticket with us.
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.
Hello, wcml does not support our plugin for card payments, so we force the checkout to switch to the default currency. How can we save the previous customer's selected currency? So, that we show a message for the total price with his currency?
I have reviewed the chat you had with my colleague and I do have to agree that this request is beyond our support's scope as it does require some custom coding.
I would also recommend reaching out to a third-party contractor that specializes in WPML from here: https://wpml.org/contractors/
One more suggestion I could make to be used as a workaround would be to enable the feature to display currencies based on your visitor's location found in WooCommerce->WooCommerce Multilingual -> Multicurrency -> Show currencies based on "location"
I understand. I 'm already trying some custom functions to solve this issue.
By displaying currencies based on visitor's location, the problem is not solved, as the card payment plugin remains disabled.
I would like to suggest a new option for WCML:
Enable payment plugins which are shown as incompatible by WCML, for payment in the default currency. So, a customer can pay in his currency with compatible plugins and have the option to pay in the default currency when he selects an incompatible payment method.
Also, a variable or hook to save the previous selected currency (not current currency) will be useful.
Yes, I have tried using this feature. But, as you can see in the attached image, 2 payment methods are disabled as "not yet supported". It does not let me to set a preferred currency for these 2 (the one is for card payment).
to clarify, the problem you are experiencing is that when using the Viva wallet smart checkout gateway, customers cannot pay using USD therefore they have to switch to EURO.
This is happening because Viva wallet only supports 9 currencies and USD is not one of them.
Additionally, the payment gateway is also not supported by WPML to use the gateway feature that would allow you to check out in different currencies when somebody uses USD.
If you do not have another payment gateway enabled that would support USD then no option to purchase will display.
hidden link
I would advise reaching out to their team for further support as they might be able to provide you with a hook that would allow you to pass the USD currency to EUR for example.
the basic problem is, that we can not use the gateway feature, which allow us to check out in different currencies when somebody uses USD. If we could select in settings of WCML to pay in Euro for Viva wallet smart checkout gateway there would be no problem.
Finally, after testing many hooks and custom functions, we achieved to make checkout automatically switch to Euro (so we can use all payment gateways) and in addition to show the total payment in USD too.