'checkout as guest' work same as 'register' with auto generated password
-
16-10-2019 - |
Question
On onepage-checkout page there are three methods to check out.
How checkout as guest method work same register method with auto generated password?
Solution
I would suggest observing customer_register_success
event and doing something like this:
$customer = $observer->getEvent()->getData('customer');
/* TODO: check that registration type is 'guest'. Otherwise you overwrite inserted password */
$customer->setPassword(_your_generated_password_here_)->save();
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange