This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Add a Custom Currency and Symbol in Woocommerce

Updated on August 26, 2022

4 Min Read
woocommerce custom currency symbol

When customizing an ecommerce store, you might not find any other platform that’s more flexible than WooCommerce. By default, WooCommerce comes with multiple currency options. However, you can add more currencies and their symbols to your store to improve your customer’s user experience.

This tutorial highlights the importance of a currency symbol and how to add a custom currency symbol in WooCommerce. Also, I will add a dummy currency with the name “Cloudways Currency” and use the symbol ‘CW$’ for my online store.

Importance of Custom Currency Symbol

You would like to add a custom currency symbol to your WooCommerce store because of the following reasons:

  • It makes your store versatile, providing users with various currency options.
  • Displaying the product prices in your customer’s local currencies creates familiarity and enhances their shopping experience.
  • Customers can opt for a hassle-free method to select their preferred currency.
  • It also increases conversion rates.
  • It expands your reach to new regions without worrying about currency conversion.

Managed WooCommerce Hosting Starting from $10/month.

Create, manage, and customize your WooCommerce store with complete freedom.

Add Custom Currency in WooCommerce

You may add a custom currency and its symbol to your WooCommerce store by following the steps below:

  • Go to your WooCommerce Dashboard > Appearance

appearance

  • Select Theme File editor

theme file editor

  • Open the functions.php, located in the theme folder.

functions.php

  • Add the following lines of code at the end of the file and save the file.
add_filter( 'woocommerce_currencies', 'add_cw_currency' );
function add_cw_currency( $cw_currency ) {
     $cw_currency['CLOUDWAYS'] = __( 'CLOUDWAYS CURRECY', 'woocommerce' );
     return $cw_currency;
}
add_filter('woocommerce_currency_symbol', 'add_cw_currency_symbol', 10, 2);
function add_cw_currency_symbol( $custom_currency_symbol, $custom_currency ) {
     switch( $custom_currency ) {
         case 'CLOUDWAYS': $custom_currency_symbol = 'CW$'; break;
     }
     return $custom_currency_symbol;
}

Note: Refer to this section for the code’s explanation.

  • Go to your WordPress dashboard.
  • Navigate to the WooCommerce tab, and click Settings.

currency options

  • Click the Currency drop-down under Currency Options; you will see the newly added custom currency at the end of the dropdown.

country

  • Select the newly added currency from here and save the settings.

Validate Custom Code in WooCommerce

Here’s a breakdown of the code we used in the steps above. The following function adds a custom currency:

add_filter( 'woocommerce_currencies', 'add_cw_currency' );
function add_cw_currency( $cw_currency ) {
     $cw_currency['CLOUDWAYS'] = __( 'CLOUDWAYS CURRECY', 'woocommerce' );
     return $cw_currency;
}
  • I have created a custom currency, i.e., Cloudways Currency, and it appears on the backend:

currency position

  • The function below adds the currency symbol. And I have used CW$ as the currency symbol.
add_filter('woocommerce_currency_symbol', 'add_cw_currency_symbol', 10, 2);
function add_cw_currency_symbol( $custom_currency_symbol, $custom_currency ) {
     switch( $custom_currency ) {
         case 'CLOUDWAYS': $custom_currency_symbol = 'CW$'; break;
     }
     return $custom_currency_symbol;
}

 

product

  • Go to the site’s front end, and refresh the page.

You will see the newly added custom currency being displayed on product pages.

product default sorting

Summary

This tutorial lists the steps to add custom currency and symbols to WooCommerce. The process is simple, and even a beginner can follow the steps to add a custom currency and its symbol to their stores.

The coding part involves adding a custom filter to the functions.php file. If you need further help with the topic, leave a comment below, and I will get back to you.

Frequently Asked Questions

Q. How do I add a custom currency and symbol in WooCommerce?

A. Follow the steps below to add a custom currency and symbol to your WooCommerce store:

  • Go to your child’s theme function file or install a code snippets plugin
  • Insert the following code snippet:
/**
 * Custom currency and currency symbol
 */
add_filter( 'woocommerce_currencies', 'add_my_currency' );

function add_my_currency( $currencies ) {
     $currencies['ABC'] = __( 'Currency name', '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 'ABC': $currency_symbol = '$'; break;
     }
     return $currency_symbol;
}

Note: Don’t change your parent theme directly because it is risky. We recommend using a child theme for risk-free custom code integration.

Q. How do I set currency in WooCommerce?

A. Modify the currency settings by following the steps below:

  • Go to WooCommerce Dashboard.
  • Click Settings > General Tab.
  • Look for the Currency options section.
  • Select your custom currency symbol field.

Q. Can you have multiple currencies in WooCommerce?

A. Yes, WooCommerce has a Multi-Currency extension that allows you to switch currencies and re-calculate rates.

Also, you can use a multi-currency plugin such as WooCommerce Currency Switcher to add any type of currency to your WooCommerce store.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Customer Review at

“Great performance for the price, and plenty of control”

Sean P [SMB Owner]

Owais Alam

is the WordPress Community Manager at Cloudways - A Managed WooCommerce Hosting Platform and a seasoned PHP developer. He loves to develop all sorts of websites on WordPress and is in love with WooCommerce in particular. You can email him at [email protected]

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Unleash The Cloud.
Not Budgets.

For 4 Months +
Up To 30 Free Migrations

Cyber Week

SAVINGS
Time Left In Offer
  • 0

    Days

  • 0

    Hours

  • 0

    Minutes

  • 0

    Seconds

40% OFF

On All Plans

GET THE DEAL NOW