BlockTemplateUtilsDuplicated::theme_has_template()public staticWC 1.0

Check if the theme has a template. So we know if to load our own in or not.

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

Хуков нет.

Возвращает

true|false.

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

$result = BlockTemplateUtilsDuplicated::theme_has_template( $template_name );
$template_name(строка) (обязательный)
name of the template file without .html extension e.g. 'single-product'.

Код BlockTemplateUtilsDuplicated::theme_has_template() WC 9.4.2

public static function theme_has_template( $template_name ) {
	return (bool) self::get_theme_template_path( $template_name, 'wp_template' );
}