WordPress filter hook
woocommerce_paypal_rest_api_supported_currencies
Fired by 3 WordPress plugins, running on 10K+ sites between them.
How to use woocommerce_paypal_rest_api_supported_currencies
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_paypal_rest_api_supported_currencies', function( $woocommerce_paypal_supported_currencies ) {
// Change $woocommerce_paypal_supported_currencies here.
return $woocommerce_paypal_supported_currencies;
}, 10, 1 );Argument names come from Payment Gateway for PayPal on WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
3 plugins that fire woocommerce_paypal_rest_api_supported_currencies
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Payment Gateway for PayPal on WooCommerce10,000+ installs
apply_filters( 'woocommerce_paypal_rest_api_supported_currencies', $this->woocommerce_paypal_supported_currencies )includes/gateways/express-checkout-nvp/class-woo-paypal-gateway-express-checkout.php:189 -
PayPal Payment for WooCommerce50+ installs
apply_filters( 'woocommerce_paypal_rest_api_supported_currencies', $this->woocommerce_paypal_supported_currencies )includes/gateways/express-checkout/class-wc-gateway-palmodule-express-checkout.php:136 -
PayPal Express Checkout For Woo50+ installs
apply_filters( 'woocommerce_paypal_rest_api_supported_currencies', $this->woocommerce_paypal_supported_currencies )includes/express-checkout/class-wc-gateway-pal-express-checkout.php:136
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.