What is the difference between <catalog_category_save_after>
and <catalog_category_save_commit_after>
in Magento?
I'm going to create a new module and i have to decide in which of those two events to hang my observer.
The category (and all other objects) are saved inside a transaction. The event catalog_category_save_after
is triggered inside the transaction. So any error that might appear in the observers of this event will trigger a rollback.
The event catalog_category_save_commit_after
is triggered after the transaction is commit-ed. So any error inside the observers for this event will not trigger a rollback for the category save.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With