woocommerce_geolocation_geoip_apis

FILTER woocommerce\includes\class-wc-geolocation.php (ligne 288) github
Use APIs to Geolocate the user. Geolocation APIs can be added through the use of the woocommerce_geolocation_geoip_apis filter. Provide a name=>value pair for service-slug=>endpoint. If APIs are defined, one will be chosen at random to fulfil the request. After completing, the result will be cached in a transient.

Paramètres

Entrée :
self::$geoip_apis
Sortie :
@param  string $ip_address IP address.
@return string

Utilisation

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

function ma_fonction_filtre(self::$geoip_apis) {
    // Modifier la valeur
    return self::$geoip_apis;
}

Actualités

Chargement des actualités...