Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WooCommerce - Sell in specific States/Provinces/Regions
<?php
/**
* Sell only in Minas Gerais. Brazil
*/
function wc_sell_only_states( $states ) {
$states['BR'] = array(
'MG' => __( 'Minas Gerais', '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