Automattic\WooCommerce\Blocks\Utils

BlockTemplateUtils::should_use_blockified_product_grid_templates()public staticWC 1.0

Returns whether the blockified templates should be used or not. If the option is not stored on the db, we need to check if the current theme is a block one or not.

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

Хуков нет.

Возвращает

true|false.

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

$result = BlockTemplateUtils::should_use_blockified_product_grid_templates();

Код BlockTemplateUtils::should_use_blockified_product_grid_templates() WC 6.9.1

public static function should_use_blockified_product_grid_templates() {
	$use_blockified_templates = get_option( Options::WC_BLOCK_USE_BLOCKIFIED_PRODUCT_GRID_BLOCK_AS_TEMPLATE );

	if ( false === $use_blockified_templates ) {
		return wc_current_theme_is_fse_theme();
	}

	return wc_string_to_bool( $use_blockified_templates );
}