Remove specific states of a country on Woocommerce Checkout

Share Now

*** Add this code on functions.php

/**
 * Modify Woocommerce states array
 *
 * @param array $states, collection of all $states
 * @return array $states, modified array.
*/
add_filter( 'woocommerce_states', function( $states ){
    // Unset Hawaii
    unset( $states['US']['HI'] );

    return $states;
}, 999);
Picture of Nahid Mahamud

Nahid Mahamud

Web Developer | Graphic Designer | WordPress & Woo-commerce Expert