woocommerce_states хук-фильтрWC 1.5.3

Allows filtering of country states in WC.

Использование

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(массив)
-

Список изменений

С версии 1.5.3 Введена.

Где вызывается хук

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' );

Где используется хук в WooCommerce

Использование не найдено.