Magento 2 Observer Event for core_block_abstract_to_html_after Replacement event-observermagento2 I use the "core_block_abstract_to_html_after" event in magento 1. What is the equivalent in Magento 2? Best Answer It seems that \Magento\Framework\View\Element\AbstractBlock::toHtml haven't such event. You can achieve such result in different ways: If you need to add some customization for specific block, you can use it's _afterToHtml method. To customize all block's output globally, use plugin for Magento\Framework\View\Element\AbstractBlock and implement aftreToHtml method. More information available here: http://devdocs.magento.com/guides/v2.0/extension-dev-guide/plugins.html Related SolutionsWho Called the Event/Observer in Magento 1.8? Events like *_load_after have no information where or by whom they were called. But using request object you can get area, mudule, controller and action name and check them as you want. $oArea = Mage::app()->getArea(); $oRequest = Mage::app()->getRequest(); $sModuleName = $oRequest->getModuleName(); $sControllerName = $oRequest->getControllerName(); $sAtionName = $oRequest->getActionName(); But you will have problem if some model (in your case sales_order) can be called twice on the same page. Magento 2 Shipping – Event Used While Submitting a Shipment You can refer to answer in following thread. It is similar to your issue. Magento2 - dispatched event for create shipment Related Topic
Best Answer
It seems that
\Magento\Framework\View\Element\AbstractBlock::toHtml
haven't such event. You can achieve such result in different ways: