Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to Add Currency Suffix on Cart & Checkout in WooCommerce?

Are you looking to improve the user experience on your WooCommerce store by displaying clearer price information during the checkout process? This post will provide you with a way to add a  current active currency suffix to product prices specifically on the cart and checkout.

add_filter('woocommerce_price_format', 'ts_add_currency_suffix', 10, 2);

function ts_add_currency_suffix($price, $currency_symbol) {

    // Only add the suffix on cart and checkout pages
    if (is_cart() || is_checkout()) {

        // Get the current currency code
        $currency = get_woocommerce_currency();

        // Add the suffix to the price
        $price .= ' ' . $currency;

    }
    return $price;
}

Output

On the WooCommerce cart page, it displays the currency suffix i.e. USD along with price as shown below.

How to Add Currency Suffix on Cart & Checkout in WooCommerce

It also shows the currency suffix with the product price on the WooCommerce checkout page as shown below.

How to Add Currency Suffix on Cart & Checkout in WooCommerce

Similarly, you can also add prefix or suffix to product prices in WooCommerce single product page by modifying the default product items.

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials

Share It:

Subscribe
Notify of
6 Comments
Newest
Oldest
Inline Feedbacks
View all comments
Josh
4 months ago

Worked well, thank you

Editor
4 months ago
Reply to  Josh

Hi Josh,

You’re welcome!!

Eonomaz
4 months ago

Not work in 9.0.2

Editor
4 months ago
Reply to  Eonomaz

Hi Eonomaz,

The code has been tested in the updated WooCommerce version (9.1.1) and it is working fine. Could you please confirm if you’ve followed all the troubleshooting steps mentioned in the previous reply?
If you’ve already done so, could you provide more details about any additional customizations that you have implemented in your site. Also, please confirm whether you are checking the output on the classic cart & checkout (shortcodes) page or on the checkout blocks page. This will help us pinpoint the exact cause and to assist you better.

barkha
5 months ago

not worked

Editor
5 months ago
Reply to  barkha

Hi Barkha,

The code has been tested in the updated WooCommerce version (9.0.0) and it is working fine. Please try checking it again after deactivating all other plugins except WooCommerce and switching to a default WordPress theme to avoid any plugin/theme conflicts. If the issue persists, please get back to us with the additional customization details you have implemented on your site, so that we can assist you better.

6
0
Would love your thoughts, please comment.x
()
x