How to add Indian Currency to WooCommerce Plugin?

We were developing a nice e-commerce website using woocommerce plugin. This e-commerce website is used for selling “Electronics woocommerceGoods”. Our client was looking to setup a website separately for Indian Customers. We had checked woocommerce plugin and found that Indian currency was not listed :(.

We did some research and have developed a code which you can add easily to woocommerce core-funcitons file. Add the code to this file: woocommerce/woocommerce-core-functions.php.

// Add currency / symbol
add_filter( ‘woocommerce_currencies’, ‘add_rupees_currency’ );
add_filter( ‘woocommerce_currency_symbol’, ‘add_rupees_currency_symbol’ );

function add_rupees_currency( $currencies ) {
$currencies[‘INR’] = __( ‘Indian Rupees (Rs.)’, ‘woothemes’ );
return $currencies;
}

function add_rupees_currency_symbol( $symbol ) {
$currency = get_option( ‘woocommerce_currency’ );
switch( $currency ) {
case ‘INR’: $symbol = ‘INR’; break;
}
return $symbol;
}

The above code is useful to add any currency to woocommerce plugin. I hope you guys like this code. If you do, I kindly request you to share the same to as many people as you can.

If you are looking for a e-commerce website using wordpress platform, please contact us we will be glad to assist you.