_coreRegistry = $coreRegistry; } /** * Save order into registry to use it in the overloaded controller. * * @param EventObserver $observer * @return $this */ public function execute(EventObserver $observer) { /* @var $order \Magento\Sales\Model\Order */ $order = $observer->getEvent()->getData('order'); $this->_coreRegistry->register('hss_order', $order, true); return $this; } }