Skip to content
Docs
Get RestroPress

Filter

rpress_payment_currency

Updated
On this page

Filters the currency name returned for a payment.

Runs at the end of rpress_get_payment_currency(). The filtered value is the currency name looked up from the payment's currency code, not the code itself; use rpress_get_payment_currency_code() for the code.

Parameters#

ParameterTypeDescription
$currency_namestringThe currency name for the payment's currency code.
$payment_idintThe payment (order) ID.

Return value#

string. The currency name.

Example#

add_filter( 'rpress_payment_currency', 'my_payment_currency_name', 10, 2 );
function my_payment_currency_name( $currency_name, $payment_id ) {
	return trim( $currency_name );
}

Source#

Applied in:

  • includes/payments/functions.php (line 1400), in rpress_get_payment_currency()

See also#

Was this page helpful?