Automattic\WooCommerce\Internal\CustomerEmailVerification

EmailVerificationService::has_pending_key │ public │ WC 11.0.0

Whether the user currently has a pending (minted, unexpired) verification key awaiting use.

Used to decide whether the My Account prompt shows the "check your inbox" notice or the "send a confirmation link" call to action.

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

Хуков нет.

Возвращает

bool.

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

$EmailVerificationService = new EmailVerificationService();
$EmailVerificationService->has_pending_key( $user_id ): bool;
$user_id(int) (обязательный)
WordPress user ID.

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

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

Код EmailVerificationService::has_pending_key() WC 11.2.2

public function has_pending_key( int $user_id ): bool {
	$parsed = $this->parse_stored_key( $user_id );

	return null !== $parsed && time() - $parsed[0] <= self::KEY_TTL;
}