Force currency

  • Author
    Posts
  • #64644

    kristian_lautrup
    Participant

    Hi,
    I want to force the selected currency to EUR for page https://krtlatest.upxycled.com/store-manager (unfortunately WCFM marketplace plugin does not support multicurrency).

    Can you please assist how to do this either using a setting in the Multi Currency setup, or using a hook.

    For instance for WPML currency converter it can be done using hook wcml_client_currency like this in functions.php

    // Force EUR in Store Manager
    add_filter(‘wcml_client_currency’, ‘custom_wcml_switch_currency’);
    function custom_wcml_switch_currency($currency) {
    if( strpos($_SERVER[‘REQUEST_URI’], “store-manager”) !== false ) {
    global $woocommerce;

    //CHANGE THE CURRENCY
    $currency = ‘EUR’;
    $woocommerce->session->set(‘client_currency’, $currency);

    return $currency;
    }

    return $currency;
    }

You must be logged in to see replies to this topic. Click here to login or register