Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Sell only in California
*/
function wc_sell_only_states( $states ) {
$states['US'] = array(
'CA' => __( 'California', 'woocommerce' ),
'TX' => __( 'Texas', 'woocommerce' ),
);
return $states;
}
add_filter( 'woocommerce_states', 'wc_sell_only_states' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.