woocommerce_geolocate_ip хук-фильтрWC 1.0

Geolocate an IP address.

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

add_filter( 'woocommerce_geolocate_ip', 'wp_kama_woocommerce_geolocate_ip_filter', 10, 3 );

/**
 * Function for `woocommerce_geolocate_ip` filter-hook.
 * 
 * @param string $ip_address   IP Address.
 * @param bool   $fallback     If true, fallbacks to alternative IP detection (can be slower).
 * @param        $api_fallback 
 *
 * @return string
 */
function wp_kama_woocommerce_geolocate_ip_filter( $ip_address, $fallback, $api_fallback ){

	// filter...
	return $ip_address;
}
$ip_address(строка)
IP Address.
$fallback(true|false)
If true, fallbacks to alternative IP detection (can be slower).
$api_fallback
-

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

WC_Geolocation::geolocate_ip()
woocommerce_geolocate_ip
woocommerce/includes/class-wc-geolocation.php 146
$country_code = apply_filters( 'woocommerce_geolocate_ip', false, $ip_address, $fallback, $api_fallback );

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

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