Skip to content

Instantly share code, notes, and snippets.

@bryceadams
Created July 10, 2014 23:00
Show Gist options
  • Save bryceadams/0fe1144b34951d7bb654 to your computer and use it in GitHub Desktop.
Save bryceadams/0fe1144b34951d7bb654 to your computer and use it in GitHub Desktop.
<?php
/*
* Make State Field Required
*/
add_filter( 'woocommerce_get_country_locale', 'wcs_custom_checkout_locale' );
function wcs_custom_checkout_locale( $locale ) {
$locale['GB']['state']['required'] = true;
return $locale;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment