woocommerce_geolocate_ip

FILTER woocommerce\includes\class-wc-geolocation.php (ligne 161) github
Filter to allow custom geolocation of the IP address.

Paramètres

Entrée :
false, $ip_address, $fallback, $api_fallback
Sortie :
@param string $geolocation Country code.
@param string $ip_address IP Address.
@param bool $fallback If true, fallbacks to alternative IP detection (can be slower).
@param bool $api_fallback If true, uses geolocation APIs if the database file doesn't exist (can be slower).
@return string

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_geolocate_ip'
add_filter('woocommerce_geolocate_ip', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(false) {
    // Modifier la valeur
    return false;
}

Actualités

Chargement des actualités...