WC_Geolocation::is_geolocation_enabled │ private static │ WC 3.4.0

Check if geolocation is enabled.

Метод класса: WC_Geolocation{}

Хуков нет.

Возвращает

bool.

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

$result = WC_Geolocation::is_geolocation_enabled( $current_settings );
$current_settings(строка) (обязательный)
Current geolocation settings.

Список изменений

С версии 3.4.0 Введена.

Код WC_Geolocation::is_geolocation_enabled() WC 11.2.2

private static function is_geolocation_enabled( $current_settings ) {
	return in_array( $current_settings, array( DefaultCustomerAddress::GEOLOCATION, DefaultCustomerAddress::GEOLOCATION_AJAX ), true );
}