hair

Well I have found an easy solution to add Indian currency to woo-commerce plugin. All that you have to do is

Method-1

1. Login to your control panel

2. go to file manager and select your website where woo-commerce is installed

3. go to wp-content/plugins/woocommerce/admin/settings/settings-init.php

4. Code to add currency starts between Line 46 to 72

5. Now add  ’INR’ => __( ‘Indian Rupee (Rs)’, ‘woocommerce’ ), between these lines

6. Press Save or Update

7. Now go to woo-commerce Setting, at currency section you can find INR.

If Method-1 does not work, then

Method-2

Paste this code in your theme functions.php and save

add_filter( ‘woocommerce_currencies’, ‘add_my_currency’ );
function add_my_currency( $currencies ) {
     $currencies['INR'] = __( ‘Indian Rupee’, ‘woocommerce’ );
     return $currencies;
}
add_filter(‘woocommerce_currency_symbol’, ‘add_my_currency_symbol’, 10, 2);
function add_my_currency_symbol( $currency_symbol, $currency ) {
     switch( $currency ) {
          case ‘INR’: $currency_symbol = ‘Rs’; break;
     }
     return $currency_symbol;
}

This solution has worked for me.

This blog is composed by

Doitmite Team

 

 

Leave a reply