Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

CustomizeStore::has_custom_template()privateWC 1.0

Checks if the post is a template or a template part.

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

Хуков нет.

Возвращает

true|false. Whether the post is a template or a template part.

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

// private - только в коде основоного (родительского) класса
$result = $this->has_custom_template( $post );
$post(WP_Post) (обязательный)
The post object.

Код CustomizeStore::has_custom_template() WC 9.7.1

private function has_custom_template( WP_Post $post ) {
	return in_array( $post->post_type, array( 'wp_template', 'wp_template_part' ), true );
}