0

Is it possible somehow to add callback on event in magento without registering observer in for it ? (like wordpress hooks works)

For example, add callback:

    FunctionToAddCallback('catalog_product_save_after', function(){ Mage::log('callback works'); });

and after

    Mage::dispatchEvent('catalog_product_save_after',array('product'=>$this));

It should log 'callback works'.

Is this possible or adding observer is the only way ?

1 Answer 1

2

Adding an observer is the only way.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.