Skip to content
Docs
Get RestroPress

Filter

rpress_paypal_sandbox_fallback_currency

Updated
On this page

Filters the fallback currency used for PayPal sandbox checkout when the store currency is INR.

Runs in rpress_get_paypal_checkout_currency only when test mode is on and the store currency is INR. The default is USD. An empty return value falls back to USD, and the value is uppercased.

Parameters#

ParameterTypeDescription
$fallback_currencystringFallback currency code. Defaults to 'USD'.
$store_currencystringStore currency code, always 'INR' when this filter runs.

Return value#

string. The fallback currency code.

Example#

function my_paypal_sandbox_fallback_currency( $fallback_currency, $store_currency ) {
	return 'EUR';
}
add_filter( 'rpress_paypal_sandbox_fallback_currency', 'my_paypal_sandbox_fallback_currency', 10, 2 );

Source#

Applied in:

  • includes/gateways/paypal-standard.php (line 1347), in rpress_get_paypal_checkout_currency()

See also#

Was this page helpful?