Skip to content

Instantly share code, notes, and snippets.

@ediamin
Last active March 5, 2017 08:41
Show Gist options
  • Save ediamin/882b32b47ed4ab4bcb0126073a97b567 to your computer and use it in GitHub Desktop.
Save ediamin/882b32b47ed4ab4bcb0126073a97b567 to your computer and use it in GitHub Desktop.
How to add more country states in WP ERP
<?php
// use `erp_states` filter hook to add country states
add_filter( 'erp_states', function ( $states ) {
$states['NL'] = [
'DR' => 'Drenthe',
'FL' => 'Flevoland',
'FR' => 'Fryslân (fy)',
'GE' => 'Gelderland',
'GR' => 'Groningen',
'LI' => 'Limburg',
'NB' => 'Noord-Brabant',
'NH' => 'Noord-Holland',
'OV' => 'Overijssel',
'UT' => 'Utrecht',
'ZE' => 'Zeeland',
'ZH' => 'Zuid-Holland',
];
return $states;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment