Skip to content

Instantly share code, notes, and snippets.

@dublado
Forked from woogists/wc-add-modify-states.php
Created June 7, 2018 00:41
Show Gist options
  • Save dublado/c60633d2cb16c0662cc0583f3a6871cc to your computer and use it in GitHub Desktop.
Save dublado/c60633d2cb16c0662cc0583f3a6871cc to your computer and use it in GitHub Desktop.
[General Snippets] Add or modify states
/**
* Add or modify States
*/
add_filter( 'woocommerce_states', 'custom_woocommerce_states' );
function custom_woocommerce_states( $states ) {
$states['XX'] = array(
'XX1' => 'State 1',
'XX2' => 'State 2'
);
return $states;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment