Automattic\WooCommerce\Blocks\Utils

BlockTemplateUtils::get_block_template_description()public staticWC 1.0

Returns template description.

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

Хуков нет.

Возвращает

Строку. Template description.

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

$result = BlockTemplateUtils::get_block_template_description( $template_slug );
$template_slug(строка) (обязательный)
The template slug (e.g. single-product).

Код BlockTemplateUtils::get_block_template_description() WC 9.8.4

public static function get_block_template_description( $template_slug ) {
	$registered_template = self::get_template( $template_slug );
	if ( isset( $registered_template ) ) {
		return $registered_template->get_template_description();
	}
	return '';
}