Automattic\WooCommerce\Blocks\Utils

BlockTemplateUtils::template_has_title()public staticWC 1.0

Returns whether the passed $template has a title, and it's different from the slug.

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

Хуков нет.

Возвращает

true|false.

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

$result = BlockTemplateUtils::template_has_title( $template );
$template(объект) (обязательный)
The template object.

Код BlockTemplateUtils::template_has_title() WC 8.7.0

public static function template_has_title( $template ) {
	return ! empty( $template->title ) && $template->title !== $template->slug;
}