post_content; // Check for WooCommerce Block Checkout if (has_blocks($content)) { if (strpos($content, 'woocommerce/checkout') !== false) { return 'block'; } } // Check for Classic Shortcode if (has_shortcode($content, 'woocommerce_checkout')) { return 'classic'; } // Default to classic return 'classic'; } /** * Get checkout type */ public function get_checkout_type() { return $this->detect_checkout_type(); } }