Double select on the Checkout Page

Problem: On the Checkout page, WooCommerce has double select field Country.

How to remove double select on the Checkout Page in WooCommerce

Solution: Try use this code:

add_action( 'wp_enqueue_scripts', 'dequeue_styles_and_scripts_double_select', 100 );
 
function dequeue_styles_and_scripts_double_select() {
    if ( class_exists( 'woocommerce' ) ) {
        wp_dequeue_style( 'selectWoo' );
        wp_deregister_style( 'selectWoo' );
 
        wp_dequeue_script( 'selectWoo');
        wp_deregister_script('selectWoo');
    } 
}

In addition, on the page if we set field as not requirement, it still requirement. For resolve this trouble try add the code:

wp_dequeue_script( 'wc-checkout' );
wp_deregister_style( 'wc-checkout' );

to above function.

Leave Comment

Your email address will not be published. Required fields are marked *