post_content)) { $blocks = parse_blocks($checkout_page->post_content); foreach ($blocks as $block) { if (isset($block['blockName'])) { if (strpos($block['blockName'], 'woocommerce/checkout') !== false && strpos($block['blockName'], 'classic-checkout') === false) { return 'blocks'; } } } } if (has_shortcode($checkout_page->post_content, 'woocommerce_checkout')) { return 'classic'; } $cart_checkout_blocks = get_option('woocommerce_cart_checkout_blocks_enabled'); if ($cart_checkout_blocks === 'yes') { return 'blocks'; } return 'classic'; } function enspireplugins_acfw_get_checkout_warning() { $checkout_type = enspireplugins_acfw_detect_checkout_type(); if ($checkout_type === 'blocks') { $guide_url = admin_url('admin.php?page=woo-checkout-fields&tab=guide'); return wp_kses_post( '
' . '' . esc_html__('WARNING:', 'additional-checkout-fields-for-woo') . ' ' . esc_html__('Your site is using WooCommerce Checkout Blocks. This plugin currently works only with the Classic Checkout editor.', 'additional-checkout-fields-for-woo') . ' ' . '' . esc_html__('Go to the Compatibility Guide for instructions.', 'additional-checkout-fields-for-woo') . '' . '