• Hello

    “I use a plugin for multiple currencies on my site, specifically USD and THB. However, sometimes the plugin detects and works properly, but other times it does not work correctly. It fails to detect the user’s location via geolocation or update the currency on product detail pages when using the currency switcher. I would like to check this issue or get a solution to fix it.”

    If you need further assistance with this issue or debugging the plugin, let me know!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Andrés Cifuentes

    (@andrescifuentesr)

    Hello @patiphonwongsee01,

    The multicurrency feature can be sensitive to cache implementations or some multilingual plugins. For helping avoiding that issue, you can try using our wcml_user_store_strategy filter by adding something like this in your theme’s functions.php file:

    // Use Cookie instead of WCSession
    add_filter( 'wcml_user_store_strategy', function ( $strategy, $key ) {
    return 'cookie';
    }, 10, 2 );

    Documentation:
    https://wpml.org/wcml-hook/wcml_user_store_strategy/

    Let me know if it helps.

    Thread Starter patiphonwongsee01

    (@patiphonwongsee01)

    How does this feature or function work? Because I changed to /th on my site, the function to change the currency to THB doesn’t work. I have more questions: if I detect the user’s geolocation using an external API and change the currency, I want to have a function that can handle this. Could you help, tell me someting about function change currency

    Plugin Support Andrés Cifuentes

    (@andrescifuentesr)

    That feature works when you switch currencies from our Currrency switcher.

    Now, if you need to create a custom functionnality to swtich currencys based on an external API, you may consider filters as wcml_switch_currency and wcml_set_client_currency for that purpose.

    You can find more information about them on this link:
    https://wpml.org/documentation/related-projects/woocommerce-multilingual/wcml-hooks-reference/

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.