Skip to main content

get all Observer in Magento2 for specific event

the easy way is to go to this file 

\vendor\magento\framework\Event\Manager.php

then go to this function dispatch

you can now user this 

 

foreach ($this->_eventConfig->getObservers($eventName) as $observerConfig) {
    if ($eventName == "catalog_product_save_after") {
         $all_observers = print_r($observerConfig, true);
    }
}

Tags