I'm altering "review" form in checkout process and adding custom submit handler. From that handler, if user is registered I can get it's email address as:
$user = \Drupal\user\Entity\User::load(\Drupal::currentUser()->id());
$email = $user->getEmail();
But if I go to checkout as a guess user I can not get email of anonymous user that way - returns null.
How can I get guest user email address? I need a way to get email provided on previous checkout page, no matter if user is registered or not.