Automattic\WooCommerce\Blocks\Templates
CheckoutTemplate::is_active_template()
True when viewing the checkout page or checkout endpoint.
Method of the class: CheckoutTemplate{}
No Hooks.
Return
true|false
.
Usage
// protected - for code of main (parent) or child class $result = $this->is_active_template();
CheckoutTemplate::is_active_template() CheckoutTemplate::is active template code WC 9.3.3
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; }