woocommerce_get_country_locale_base │ filter-hook │ WC 1.5.4

Filters the default and shop base country address field settings, which apply when the checkout country changes.

Usage

add_filter( 'woocommerce_get_country_locale_base', 'wp_kama_woocommerce_get_country_locale_base_filter' );

/**
 * Function for `woocommerce_get_country_locale_base` filter-hook.
 * 
 * @param array $fields Address field settings.
 *
 * @return array
 */
function wp_kama_woocommerce_get_country_locale_base_filter( $fields ){
	// filter...
	return $fields;
}
$fields(array)
Address field settings.

Changelog

Since 1.5.4 Introduced.

Where the hook is called

WC_Countries::get_country_locale()
woocommerce_get_country_locale_base
woocommerce/includes/class-wc-countries.php 1924
$locale['default'] = apply_filters( 'woocommerce_get_country_locale_base', $locale['default'] );
woocommerce/includes/class-wc-countries.php 1932
$locale[ $this->get_base_country() ] = apply_filters( 'woocommerce_get_country_locale_base', $locale[ $this->get_base_country() ] );

Where the hook is used in WooCommerce

Usage not found.