When using the customer_account_create
event, the session model in my class is not able to return the customer ID using $this->customerSession->getId();
.
However, for testing purposes, when using the customer_account_edited
observer event, the session is returning the correct ID of the customer. I am guessing that the session is not fully initialized when using the account creation event.
How can I get the customer ID in my class when using the customer_account_create
observer event. The session model doesn’t seem to work.