woocommerce_sort_countries │ хук-фильтр │ WC 2.0.0

Filters whether the list of countries is sorted by name.

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

add_filter( 'woocommerce_sort_countries', 'wp_kama_woocommerce_sort_countries_filter' );

/**
 * Function for `woocommerce_sort_countries` filter-hook.
 * 
 * @param bool $sort Whether to sort the countries.
 *
 * @return bool
 */
function wp_kama_woocommerce_sort_countries_filter( $sort ){
	// filter...
	return $sort;
}
$sort(true|false)
Whether to sort the countries.
По умолчанию: true

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

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

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

WC_Countries::get_countries()
woocommerce_sort_countries
woocommerce/includes/class-wc-countries.php 192
if ( apply_filters( 'woocommerce_sort_countries', true ) ) {

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

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