WordPress filter hook
woocommerce_paypal_pro_allowed_currencies
Fired by 3 WordPress plugins, running on 10K+ sites between them.
How to use woocommerce_paypal_pro_allowed_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_pro_allowed_currencies', function( $value ) {
// Change $value here.
return $value;
}, 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_pro_allowed_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_pro_allowed_currencies', array('AUD', 'CAD', 'CZK', 'DKK', 'EUR', 'HUF', 'JPY', 'NOK', 'NZD', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'USD') )includes/gateways/paypal-pro/class-woo-paypal-gateway-paypal-pro.php:137 -
Payment Gateway for PayPal Pro on WooCommerce80+ installs
apply_filters( 'woocommerce_paypal_pro_allowed_currencies', array('AUD', 'CAD', 'CZK', 'DKK', 'EUR', 'HUF', 'JPY', 'NOK', 'NZD', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'USD') )includes/class-woo-paypal-pro-gateway.php:86 -
PayPal Payment for WooCommerce50+ installs
apply_filters( 'woocommerce_paypal_pro_allowed_currencies', array('AUD', 'CAD', 'CZK', 'DKK', 'EUR', 'HUF', 'JPY', 'NOK', 'NZD', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'USD') )includes/gateways/paypal-pro/class-wc-gateway-palmodule-paypal-pro.php:134
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.