I've just started with Magento 2, but I have few question why try to get customer data from event observer.
Here is what I'm using inside my observer. And the event is adminhtml_customer_save_after
$this->_xmlGenerator->saveCustomerToXml($observer->getEvent()->getCustomer());
It is return an object from Magento\Customer\Model\Data
. And this make my concernation. I can't find anything related to something like getPhone()
inside the codebase.
And how to get specified address from getAddresses()
Do you have any suggestions for me?