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

    (@diegootgs)

    Hello @devinv,

    We don’t have this feature in the plugin yet. However, I found a workaround that may be helpful:
    – Backup the website
    – Add the following code to your functions.php file:

    add_filter( 'wcml_client_currency', 'modify_client_currency', 10, 1 );
      
    function modify_client_currency( $current_currency ) {
        if( !is_admin() ){
            global $woocommerce;
      
            $currency = isset( $_GET['currency'] ) ? esc_attr( $_GET['currency'] ) : $current_currency;
            $currency = strtoupper( $currency );
      
            $woocommerce->session->set('client_currency', $currency);
      
            return $currency;
          }
    }

    – After that, you can add the ?currency= parameter on the url (e.g. /product/test-22?currency=USD) to select a specific currency.

    Please let us know if it worked.

Viewing 1 replies (of 1 total)
  • The topic ‘Site URL with selected currency’ is closed to new replies.