WooCommerce – Sell to only one State

Let’s say you are selling fresh produce and only want to sell to your home state.

Because you are selling fresh produce such as fruits, vegetables and don’t have a proper delivery system in place to deliver all over the country.

add_filter( ‘woocommerce_states’, ‘bwt_restrict_states’ );

function bwt_restrict_states( $states ) {

$states[‘IN’] = array(
‘TS’ => __( ‘Telangana’, ‘woocommerce’ ),
);
return $states;
}

 

Similar Posts