Automattic\WooCommerce\Blocks\Templates
CheckoutTemplate::is_active_template
True when viewing the checkout page or checkout endpoint.
Метод класса: CheckoutTemplate{}
Хуков нет.
Возвращает
true|false.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_active_template();
Код CheckoutTemplate::is_active_template() CheckoutTemplate::is active template WC 10.3.6
protected function is_active_template() {
global $post;
$placeholder = $this->get_placeholder_page();
return null !== $placeholder && $post instanceof \WP_Post && $placeholder->post_name === $post->post_name;
}