Skip to content
Docs
Get RestroPress

Filter

rpress_currency_symbol

Updated
On this page

Filters the symbol displayed for a currency.

Applied after the built-in symbol for the currency has been determined. If no symbol is known the currency code is used.

Parameters#

ParameterTypeDescription
$symbolstringSymbol or HTML entity.
$currencystringCurrency code.

Return value#

string. The currency symbol.

Example#

function my_currency_symbol( $symbol, $currency ) {
	if ( 'INR' === $currency ) {
		return 'Rs.';
	}
	return $symbol;
}
add_filter( 'rpress_currency_symbol', 'my_currency_symbol', 10, 2 );

Source#

Applied in:

  • includes/rp-core-functions.php (line 2177), in rpress_currency_symbol()

See also#

Was this page helpful?