Skip to content

Instantly share code, notes, and snippets.

@coenjacobs
Created January 29, 2013 13:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coenjacobs/4664271 to your computer and use it in GitHub Desktop.
Save coenjacobs/4664271 to your computer and use it in GitHub Desktop.
Removes the Dutch provinces from WooCommerce country dropdown boxes as they are not required for Dutch shops. Will become superfluous once WooCommerce 2.0 is released. Important: Make sure you select 'Netherlands' as country again in WooCommerce settings.
<?php
/*
Plugin Name: WC Remove Dutch Provinces
Description: Removes the Dutch provinces from the WooCommerce country dropdown boxes, no need to show these. Will become superfluous once WooCommerce 2.0 is released. Important: Make sure you select 'Netherlands' as country again in WooCommerce settings.
Author: Coen Jacobs
Author URI: http://coenjacobs.me/
*/
add_filter( 'woocommerce_states', 'cj_woocommerce_states' );
function cj_woocommerce_states( $states ) {
$states['NL'] = array();
return $states;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment