Automattic\WooCommerce\Internal\Admin\Suggestions

PaymentsExtensionSuggestions::is_extension_allowedprivateWC 1.0

Determine if a payment extension is allowed to be suggested.

Method of the class: PaymentsExtensionSuggestions{}

No Hooks.

Returns

true|false. True if the extension is allowed, false otherwise.

Usage

// private - for code of main (parent) class only
$result = $this->is_extension_allowed( $extension_id, $country_code, $context ): bool;
$extension_id(string) (required)
The extension ID.
$country_code(string) (required)
The two-letter country code.
$context(string)
The context ID of where the extension is being used.
Default: ''

PaymentsExtensionSuggestions::is_extension_allowed() code WC 10.3.3

private function is_extension_allowed( string $extension_id, string $country_code, string $context = '' ): bool { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
	// Add per-extension exclusion logic here.
	// Returning true for now to avoid excluding any extensions.
	return true;
}