woocommerce_states filter-hookWC 1.5.3

Allows filtering of country states in WC.

Usage

add_filter( 'woocommerce_states', 'wp_kama_woocommerce_states_filter' );

/**
 * Function for `woocommerce_states` filter-hook.
 * 
 * @param array $states 
 *
 * @return array
 */
function wp_kama_woocommerce_states_filter( $states ){

	// filter...
	return $states;
}
$states(array)
-

Changelog

Since 1.5.3 Introduced.

Where the hook is called

WC_Countries::load_country_states()
woocommerce_states
WC_Countries::get_states()
woocommerce_states
woocommerce/includes/class-wc-countries.php 192
$this->geo_cache['states'] = apply_filters( 'woocommerce_states', $states );
woocommerce/includes/class-wc-countries.php 210
$this->geo_cache['states'] = apply_filters( 'woocommerce_states', include WC()->plugin_path() . '/i18n/states.php' );

Where the hook is used in WooCommerce

Usage not found.