Automattic\WooCommerce\Internal\CustomerEmailVerification

VerificationController::process_verification │ public │ WC 11.0.0

Validate a key and verify the user.

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

Хуков нет.

Возвращает

bool. True when verification succeeded.

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

$VerificationController = new VerificationController();
$VerificationController->process_verification( $user_id, $key ): bool;
$user_id(int) (обязательный)
User ID.
$key(строка) (обязательный)
Plaintext verification key.

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

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

Код VerificationController::process_verification() WC 11.2.2

public function process_verification( int $user_id, string $key ): bool {
	if ( ! $user_id || '' === $key ) {
		return false;
	}
	if ( ! $this->service->check_verification_key( $user_id, $key ) ) {
		return false;
	}
	$this->service->mark_verified( $user_id );
	return true;
}