# Show the Currency Code Next to Prices

> Adds the three-letter currency code after prices on the front end, such as "$25.00 USD", so international shoppers know which dollar or crown you mean.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, prices, currency, international
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-price-currency-code/

## Code

```php
add_filter( 'woocommerce_price_format', function ( $format ) {
    if ( ( is_admin() && ! wp_doing_ajax() ) || false !== strpos( $format, 'wpide-currency-code' ) ) {
        return $format;
    }

    return $format . '&nbsp;<span class="wpide-currency-code">' . esc_html( get_woocommerce_currency() ) . '</span>';
}, 20 );
```

## Notes

Admin screens are left unchanged; remove the symbol in WooCommerce settings if you prefer the code alone.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Show the Currency Code Next to Prices" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
