Automattic\WooCommerce\Internal\PushNotifications\Services

DriverAvailabilityService::is_remote_proxy_enabled │ protected │ WC 11.2.0

Determines whether the remote proxy driver is enabled (i.e. the feature is not disabled via the filter), a dependency of that driver.

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

Хуков нет.

Возвращает

bool.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->is_remote_proxy_enabled(): bool;

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

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

Код DriverAvailabilityService::is_remote_proxy_enabled() WC 11.2.2

protected function is_remote_proxy_enabled(): bool {
	try {
		return $this->read_disabled_filter();
	} catch ( Throwable $e ) {
		$this->failed_checks[ self::CHECK_PROXY_ENABLED ] = true;

		$this->log_throwable( 'Error reading the push notifications disabled filter', $e );

		// Fail closed: an unreadable filter must not enable the feature.
		return false;
	}
}