Skip to content
Docs
Get RestroPress

Filter

rpress_{$currency}_currency_filter_after

Updated
On this page

Filters the price string when the currency symbol is placed after the amount.

Runs in rpress_currency_filter when the currency_position setting is not 'before'. The hook name includes the lowercased currency code, for example rpress_eur_currency_filter_after. Use it to change how a specific currency is displayed.

Parameters#

ParameterTypeDescription
$formattedstringPrice with the currency symbol or code placed after the amount.
$currencystringUppercase currency code, such as EUR.
$pricestringFormatted amount without the currency and without a leading minus sign.

Return value#

string. The formatted price.

Example#

function my_eur_currency_after( $formatted, $currency, $price ) {
	return $price . ' EUR';
}
add_filter( 'rpress_eur_currency_filter_after', 'my_eur_currency_after', 10, 3 );

Notes#

A leading minus sign for negative prices is added after this filter runs.

Source#

Applied in:

  • includes/formatting.php (line 252), in rpress_currency_filter()

See also#

Was this page helpful?