woocommerce_geolocate_ip filter-hookWC 1.0

Geolocate an IP address.

Usage

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(string)
IP Address.
$fallback(true|false)
If true, fallbacks to alternative IP detection (can be slower).
$api_fallback
-

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.