Automattic\WooCommerce\Internal\Admin\Suggestions

PaymentsExtensionSuggestions::is_extension_allowedprivateWC 1.0

Determine if a payment extension is allowed to be suggested.

Метод класса: PaymentsExtensionSuggestions{}

Хуков нет.

Возвращает

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

Использование

// private - только в коде основоного (родительского) класса
$result = $this->is_extension_allowed( $extension_id, $country_code, $context ): bool;
$extension_id(строка) (обязательный)
The extension ID.
$country_code(строка) (обязательный)
The two-letter country code.
$context(строка)
The context ID of where the extension is being used.
По умолчанию: ''

Код PaymentsExtensionSuggestions::is_extension_allowed() WC 10.3.4

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;
}