Background of the issue:
I am experiencing an issue where the wcml_formatted_price function is not working when performing Add to Cart or Get Cart, or create order actions via GraphQL. We are currently using the following plugins: WooCommerce Multilingual & Multicurrency, WPGraphQL, WPML GraphQL. Despite having these plugins installed and activated, the price is not being converted properly within GraphQL mutations.
Symptoms:
The price is not being converted as expected during Add to Cart or Get Cart actions via GraphQL. The price remains unchanged instead of being converted to the selected currency.
Questions:
Could you please look into this issue and provide guidance on how we can ensure that the price conversion works correctly during GraphQL mutations?
Is there any specific documentation or guidance on ensuring price conversion during GraphQL mutations like Add to Cart and Get Cart?
To ensure the quickest and most accurate support, please provide your debug information so I can look at some of your configurations. We have an excellent article on how to locate it here: https://wpml.org/faq/provide-debug-information-faster-support/.
I'll need your help reproducing the problem, so I can take a better look and eventually escalate to a dev.
I've set up a fresh WP install with the required plugins. Can you please try to reproduce the issue there and then provide me with the steps to see it?
You can log in by following this link: hidden link
You don’t need debugger information for this, as it’s not an issue. I just need some clarification.
My site uses a currency converter powered by the WooCommerce Multilingual & Multicurrency plugin.
I am using the GraphQL plugin, where I have created a mutation.
The problem is that when I change the currency from the site, the mutation (which handles the cart) correctly reflects the converted currency in the API response.
📌 Screenshots:
🔗 hidden link
🔗 hidden link
However, if I don’t change the currency from the site, the API mutation does not convert the currency either.
How can I ensure that the currency conversion happens even when it is not changed from the site?