Filter
rpress_payment_currency
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#
| Parameter | Type | Description |
|---|---|---|
$currency_name | string | The currency name for the payment's currency code. |
$payment_id | int | The 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), inrpress_get_payment_currency()
See also#
Was this page helpful?
