Automattic\WooCommerce\Blocks\Utils

BlockTemplateUtils::supports_block_templates()public staticWC 1.0

Checks to see if they are using a compatible version of WP, or if not they have a compatible version of the Gutenberg plugin installed.

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

Хуков нет.

Возвращает

true|false.

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

$result = BlockTemplateUtils::supports_block_templates();

Код BlockTemplateUtils::supports_block_templates() WC 7.1.0

public static function supports_block_templates() {
	if (
		! wc_current_theme_is_fse_theme() &&
		( ! function_exists( 'gutenberg_supports_block_templates' ) || ! gutenberg_supports_block_templates() )
	) {
		return false;
	}

	return true;
}