cancel
Showing results for 
Search instead for 
Did you mean: 

Order Confirmation Emails Addressed to 'Guest' post update

Re: Order Confirmation Emails Addressed to 'Guest' post update

It is still an issue in Magento 2.4.3, until now i was not able to find a good solution.

Re: Order Confirmation Emails Addressed to 'Guest' post update

Overwrite file: vendor/magento/module-paypal/Model/Express/Checkout.php

Update function:

 

protected function prepareGuestQuote() {
$quote = $this->_quote;
$quote->setCustomerId(null)
->setCustomerFirstname($quote->getBillingAddress()->getFirstname())
->setCustomerLastname($quote->getBillingAddress()->getLastname())
->setCustomerEmail($quote->getBillingAddress()->getEmail())
->setCustomerIsGuest(true)
->setCustomerGroupId(\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID);
return $this;
}