Home / Admin / Format USD Currency
Duplicate Snippet

Embed Snippet on Your Site

Format USD Currency

Displays $ as USD
This will make $10 be displayed as 10 USD
To set this up for your own currency, replace USD with your currency code or the sign you wish to use and replace usd in the add_filter call with the lowercase currency code.

Code Preview
php
<?php
function pw_edd_custom_currency_format( $formatted, $currency, $price ) {
	return $price . ' USD';
}
add_filter( 'edd_usd_currency_filter_before', 'pw_edd_custom_currency_format', 10, 3 );
add_filter( 'edd_usd_currency_filter_after', 'pw_edd_custom_currency_format', 10, 3 );

Comments

Add a Comment