• Resolved indiastartup360

    (@indiastartup360)


    Hi,

    I am currently using your plugin on my WooCommerce store and I’m very satisfied with its functionality. However, I have a specific requirement related to sharing checkout URLs with predefined currencies.

    I would like to share a checkout URL with a pre-selected currency. For example, I want to share a URL like this: https:/mywebsite.com/checkout/?add-to-cart=15491&currency=USD. The expectation is that when someone clicks on the shared link, the checkout page should load with the selected currency (USD) mentioned in the URL.

    I have attempted to add the currency=USD parameter to the checkout URL, but it seems that the YayCurrency plugin does not recognize or apply the currency parameter in this manner.

    Could you please provide guidance on whether the YayCurrency plugin supports URL parameters for currency selection? If it does, could you please explain how I can configure the plugin to recognize and apply the currency parameter in the checkout URL?

    I have reviewed the plugin’s documentation, but I couldn’t find specific information regarding this functionality. Therefore, I would greatly appreciate your assistance in this matter.

Viewing 1 replies (of 1 total)
  • Plugin Support mialewp

    (@mialewp)

    Hi @indiastartup360,

    Good day!

    Please add this code in functions.php file (your child theme)

    add_filter(‘yay_currency_use_params’, ‘yay_currency_use_params’, 10,1);
    function yay_currency_use_params( $use_param ) {
    return true;
    }

    Then, you can access url like below to get currency USD,…: https:/mywebsite.com/checkout/?add-to-cart=15491&yay-currency=USD

    Please refer to the doc guide here:
    https://docs.yaycommerce.com/yaycurrency/configurations/display-options/use-params-on-url

    If you have any further questions, feel free to contact us.

    Many thanks!

    Mia

    • This reply was modified 1 year, 4 months ago by mialewp.
    • This reply was modified 1 year, 4 months ago by mialewp.
Viewing 1 replies (of 1 total)
  • The topic ‘Checkout URL parameter’ is closed to new replies.