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.
Return
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 9.4.2
private function has_block_checkout() { $post = get_post( get_option( 'woocommerce_checkout_page_id' ) ); return strpos( $post->post_content, '<!-- wp:woocommerce/checkout' ) !== false; }