get_checkout_type(); } else { $checkout_type = 'classic'; // Fallback } // Localize script with checkout type wp_localize_script('cfep-admin', 'cfepCheckoutType', array( 'type' => $checkout_type, 'isBlock' => $checkout_type === 'block', 'isClassic' => $checkout_type === 'classic' )); // Localize script with admin data wp_localize_script('cfep-admin', 'cfepAdmin', array( 'restUrl' => rest_url('cfep/v1/'), 'restNonce' => wp_create_nonce('wp_rest'), 'pluginUrl' => CFEP_PLUGIN_URL, 'checkoutType' => $checkout_type )); } public function check_plugin_conflicts() { $conflicting_plugins = array( 'woo-checkout-field-editor-pro/checkout-field-editor.php' => 'WooCommerce Checkout Fields Manager', 'flexible-checkout-fields/flexible-checkout-fields.php' => 'Flexible Checkout Fields', 'woocommerce-checkout-manager/woocommerce-checkout-manager.php' => 'WooCommerce Checkout Manager', 'checkout-field-editor-and-manager-for-woocommerce/checkout-field-editor-and-manager-for-woocommerce.php' => 'WooCommerce Checkout Fields Manager', ); $active_conflicts = array(); foreach ($conflicting_plugins as $plugin => $name) { if (is_plugin_active($plugin)) { $active_conflicts[] = $name; } } if (!empty($active_conflicts)) { add_action('admin_notices', function() use ($active_conflicts) { ?>