Checkout fields: Hiding and showing existing fields
Based on this working answer: // Registering external jQuery/JS file function cfields_scripts() { // IMPORTANT NOTE: // For a child theme replace get_template_directory_uri() by get_stylesheet_directory_uri() // The external cfields.js file goes in a subfolder "js" of your active child theme or theme. wp_enqueue_script( 'checkout_script', get_template_directory_uri().'/js/cfields.js', array('jquery'), '1.0', true ); } add_action( 'wp_enqueue_scripts', 'cfields_scripts' ); add_filter( 'woocommerce_checkout_fields', 'ba_custom_checkout_billing_fields' ); function ba_custom_checkout_billing