Skip to content

Instantly share code, notes, and snippets.

@alexminza
Created February 5, 2018 18:27
Show Gist options
  • Save alexminza/8384d53e4ef8e5c066c42bc559f15775 to your computer and use it in GitHub Desktop.
Save alexminza/8384d53e4ef8e5c066c42bc559f15775 to your computer and use it in GitHub Desktop.
WooCommerce woocommerce_get_country_locale filter - state selection required for Romania
add_filter('woocommerce_get_country_locale', 'woocommerce_get_country_locale_romania');
function woocommerce_get_country_locale_romania($countries) {
//https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-countries.php
$countries['RO']['state']['required'] = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment