Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, you can try below code:

    add_filter( 'woocommerce_currencies', 'add_custom_currency' );
    function add_custom_currency( $currencies ) {
      $currencies["PKR"] = 'Pakistani Rupee';
      return $currencies;
    }
    
    add_filter('woocommerce_currency_symbol', 'add_custom_currency_symbol', 10, 2);
    function add_custom_currency_symbol( $currency_symbol, $currency ) {
    switch( $currency ) {
      case 'PKR': $currency_symbol = 'Rs.'; break;
    }
    return $currency_symbol;
    }
    Thread Starter barzakh

    (@barzakh)

    thanks! this worked great, added it in the middle of my functions.php theme file ??

    Hi terrytsan. i try this one but it says “Parse error: syntax error, unexpected T_STRING”. can you define where to put it ?

    Hi Shafan, you can add the code in your theme function.php file.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add currency (Pakistani – PKR)’ is closed to new replies.