Filter
rpress_payment_currency_default
On this page
Filters the currency assigned to a payment that has no stored currency.
Applied in RPRESS_Payment::setup_currency only when the payment meta has no currency value. The default is the store currency returned by rpress_get_currency().
Parameters#
| Parameter | Type | Description |
|---|---|---|
$currency | string | The store currency code. |
$payment | RPRESS_Payment | The payment object. |
Return value#
string. The currency code.
Example#
function my_payment_currency_default( $currency, $payment ) {
return 'USD';
}
add_filter( 'rpress_payment_currency_default', 'my_payment_currency_default', 10, 2 );
Notes#
Affects how older payments without a stored currency are displayed.
Source#
Applied in:
includes/payments/class-rpress-payment.php(line 1920), inRPRESS_Payment::setup_currency()
See also#
Was this page helpful?
