Can anyone please explain to me what is the use of core_abstract_delete_after and core_abstract_delete_commit_after events in magento 2.

For your information, it is declared in (Magento\Framework\Model\AbstractModel) this abstract class.

If it is possible so please let me know how can I test it.


Saving happens in a MySQL transaction and the delete_after event is triggered before the transaction is committed, so that you can do additional updates in the database within the same transaction.

The delete_commit_after event is triggered after the transaction has been committed, i.e. when the changes were written to the database.

  • Thank you for your answer I have one more question - Are both events call on any MySQL transaction? – Deexit Sanghani May 3 at 5:20
  • @deexiysanghani yes both are called MySql transaction one is before other is after. – Qaisar Satti May 3 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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