Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

WooCommercePayments::is_supported()public staticWC 1.0

Check if the store is in a supported country.

{} It's a method of the class: WooCommercePayments{}

No Hooks.

Return

true|false.

Usage

$result = WooCommercePayments::is_supported();

Code of WooCommercePayments::is_supported() WC 6.6.1

public static function is_supported() {
	$suggestions              = Suggestions::get_suggestions();
	$suggestion_plugins       = array_merge(
		...array_filter(
			array_column( $suggestions, 'plugins' ),
			function( $plugins ) {
				return is_array( $plugins );
			}
		)
	);
	$woocommerce_payments_ids = array_search( 'woocommerce-payments', $suggestion_plugins, true );
	if ( false !== $woocommerce_payments_ids ) {
		return true;
	}
	return false;
}