woocommerce_geolocation_ajax_get_location_hash хук-фильтрWC 3.6.0

Controls the location hash used in geolocation-based caching.

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

add_filter( 'woocommerce_geolocation_ajax_get_location_hash', 'wp_kama_woocommerce_geolocation_ajax_get_location_hash_filter', 10, 3 );

/**
 * Function for `woocommerce_geolocation_ajax_get_location_hash` filter-hook.
 * 
 * @param string      $location_hash The hash used for geolocation.
 * @param array       $location      The location/address data.
 * @param WC_Customer $customer      The current customer object.
 *
 * @return string
 */
function wp_kama_woocommerce_geolocation_ajax_get_location_hash_filter( $location_hash, $location, $customer ){

	// filter...
	return $location_hash;
}
$location_hash(строка)
The hash used for geolocation.
$location(массив)
The location/address data.
$customer(WC_Customer)
The current customer object.

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

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

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

WC_Cache_Helper::geolocation_ajax_get_location_hash()
woocommerce_geolocation_ajax_get_location_hash
woocommerce/includes/class-wc-cache-helper.php 143
return apply_filters( 'woocommerce_geolocation_ajax_get_location_hash', $location_hash, $location, $customer );

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

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