• Resolved romandesign

    (@romandesign)


    I would like to display currency code together with symbol an all prices in the store: “USD $” or “CAD $” depending on what is selected in booster’s Currency Switcher module. I tried the code below I found for WooCommerce in functions.php, but it had no effect. Maybe your plugin handles currencies differently? There is a setting for displaying currency code in the switcher dropdown, which I configured, but I don’t see setting for the rest of the site.

    Please advise. Here’s what I tried without success:

    // Add currency code
    function romandesign_currency_symbol( $currency_symbol, $currency ) {
    switch( $currency ) {
    case ‘USD’:
    $currency_symbol = ‘USD $’;
    break;
    case ‘CAD’:
    $currency_symbol = ‘CAD $’;
    break;
    }
    return $currency_symbol;
    }
    add_filter(‘woocommerce_currency_symbol’, ‘romandesign_currency_symbol’, 30, 2);

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    There’s no need for coding – Booster’s “Price formats” can do exactly that – enable module, find USD and CAD and change their “Additional Currency Code Position” option to something else rather than “Do not add currency code”.

    [ Signature deleted ]

    • This reply was modified 6 years, 4 months ago by Jan Dembowski.
    Thread Starter romandesign

    (@romandesign)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Currncy code with symbol display on all products’ is closed to new replies.