/** * If it's configured to capture on shipment - do this. * * @param \Magento\Framework\Event\Observer $observer * * @return $this */ public function execute(\Magento\Framework\Event\Observer $observer) { $customer = $observer->getEvent()->getCustomer(); //New Automation enrolment to queue $this->automation->newCustomerAutomation($customer); return $this; }
/** * Plugin for create function. * * @param \Magento\Sales\Model\Order\CustomerManagement $subject * @param $customer * @return mixed * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @codingStandardsIgnoreStart */ public function afterCreate(\Magento\Sales\Model\Order\CustomerManagement $subject, $customer) { //New Automation enrolment to queue $this->automation->newCustomerAutomation($customer); return $customer; }