WC_Gateway_Paypal::is_valid_for_use()publicWC 1.0

Check if this gateway is available in the user's country based on currency.

Method of the class: WC_Gateway_Paypal{}

Return

true|false.

Usage

$WC_Gateway_Paypal = new WC_Gateway_Paypal();
$WC_Gateway_Paypal->is_valid_for_use();

WC_Gateway_Paypal::is_valid_for_use() code WC 8.6.1

public function is_valid_for_use() {
	return in_array(
		get_woocommerce_currency(),
		apply_filters(
			'woocommerce_paypal_supported_currencies',
			array( 'AUD', 'BRL', 'CAD', 'MXN', 'NZD', 'HKD', 'SGD', 'USD', 'EUR', 'JPY', 'TRY', 'NOK', 'CZK', 'DKK', 'HUF', 'ILS', 'MYR', 'PHP', 'PLN', 'SEK', 'CHF', 'TWD', 'THB', 'GBP', 'RMB', 'RUB', 'INR' )
		),
		true
	);
}