Skip to content

Instantly share code, notes, and snippets.

@webtoffee-git
Created February 13, 2020 05:46
Show Gist options
  • Select an option

  • Save webtoffee-git/77edea58e4caa7a7a4ce86daf9e06c27 to your computer and use it in GitHub Desktop.

Select an option

Save webtoffee-git/77edea58e4caa7a7a4ce86daf9e06c27 to your computer and use it in GitHub Desktop.
Modify WooCommerce states
/**
* Add or modify WooCommerce States
*/
add_filter( 'woocommerce_states', 'webtoffee_woocommerce_states' );
function webtoffee_woocommerce_states( $states ) {
$states['XX'] = array(
'XX1' => 'State 1',
'XX2' => 'State 2',
'XX3' => 'State 3'
);
return $states;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment