Cancel addStatusHistory with an Observer

Cancel addStatusHistory with an Observer

Create a new observer on the config.xml of your module : <events> <sales_order_save_before> <observers> <mypackage_mymodule_cancel_add_history> <class>mymodule/observer</class> <method>cancelAddHistory</method> </mypackage_mymodule_cancel_add_history> </observers> </sales_order_save_before> </events> Create this observer : <?php class Mypackage_Mymodule_Model_Observer { public function cancelAddHistory(Varien_Event_Observer $observer) { $order = $observer->getEvent()->getOrder(); // My logic

We use cookies to ensure that we give you the best experience on our website.
Ok