• Resolved ihdumille

    (@ihdumille)


    Hi

    I need to change the Swedish country code from (kr) to (SEK). In my shop everything is fine, but on my orders in the administration part it says (kr) insteed, witch means that my invoices also are wrong. It is improtnant for the bookkeeping.

    I found the abouve link, but it did not work
    I changed it to this

    `/**
    * Change a currency symbol
    */
    add_filter(‘woocommerce_currency_symbol’, ‘change_existing_currency_symbol’, 10, 2);

    function change_existing_currency_symbol( $currency_symbol, $currency ) {
    switch( $currency ) {
    case ‘kr’: $currency_symbol = ‘SEK’; break;
    }
    return $currency_symbol;
    }

    Anyone whom can help me?
    /Christina

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Nearly, try:

    add_filter( 'woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);
    
    function change_existing_currency_symbol( $currency_symbol, $currency ) {
      switch( $currency ) {
        case 'SEK': $currency_symbol = 'SEK'; break;
      }
      return $currency_symbol;
    }
    Thread Starter ihdumille

    (@ihdumille)

    Hi, thanks for helping me however that did not work

    Thread Starter ihdumille

    (@ihdumille)

    A link where you see woocommerce/settings/general
    down svensk (kr)

    problem

    I tried it before posting and it worked for me.

    The default is kr for the currency-symbol and SEK for the currency. The code changes the currency-symbol to SEK.

    Did you put it in functions.php for your child theme?

    Thread Starter ihdumille

    (@ihdumille)

    Hi again, now it changed, I just needed a litle patience, after clearing my cashe ??
    Thanks a lot for your help

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to change a currency symbol’ is closed to new replies.