WC_Cache_Helper::geolocation_ajax_get_location_hash() public WC 1.0
Get a hash of the customer location.
{} Это метод класса: WC_Cache_Helper{}
Хуки из метода
Возвращает
Строку.
Использование
$result = WC_Cache_Helper::geolocation_ajax_get_location_hash();
Код WC_Cache_Helper::geolocation_ajax_get_location_hash() WC Cache Helper::geolocation ajax get location hash WC 5.0.0
public static function geolocation_ajax_get_location_hash() {
$customer = new WC_Customer( 0, true );
$location = array();
$location['country'] = $customer->get_billing_country();
$location['state'] = $customer->get_billing_state();
$location['postcode'] = $customer->get_billing_postcode();
$location['city'] = $customer->get_billing_city();
return apply_filters( 'woocommerce_geolocation_ajax_get_location_hash', substr( md5( implode( '', $location ) ), 0, 12 ), $location, $customer );
}