WC_Shop_Customizer::has_block_checkout
Weather or not the checkout page contains the Checkout block.
Method of the class: WC_Shop_Customizer{}
No Hooks.
Returns
true|false.
Usage
// private - for code of main (parent) class only $result = $this->has_block_checkout();
WC_Shop_Customizer::has_block_checkout() WC Shop Customizer::has block checkout code WC 10.3.6
private function has_block_checkout() {
$post = get_post( get_option( 'woocommerce_checkout_page_id' ) );
return strpos( $post->post_content, '<!-- wp:woocommerce/checkout' ) !== false;
}