Automattic\WooCommerce\Api\Infrastructure

Principal::is_authenticatedpublicWC 1.0

Whether the underlying WP user is authenticated.

Convenience for $principal->user->ID > 0, the canonical anonymous marker in WordPress. Use this in authorize() / execute() bodies that need to distinguish anonymous from authenticated callers.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$Principal = new Principal();
$Principal->is_authenticated(): bool;

Код Principal::is_authenticated() WC 10.9.1

public function is_authenticated(): bool {
	return $this->user->ID > 0;
}