Magento 2 - After Order Update

by Goose84   Last Updated January 12, 2018 18:09 PM

Currently I have a plugin which has the following in the di.xml

<type name="Magento\Sales\Api\OrderRepositoryInterface">
    <plugin name="MyModule_OrderAfterSave" type="Company\MyModule\Plugin\OrderAfterSave" sortOrder="10" disabled="false" />
</type>

This enables me to call my custom class when an order is saved. However what I need to do is call my plugin any time an order is updated.

The reason for the question is that I have a payment gateway extension installed and it saves the order before taking payment and then updates the order based upon if payment was successful. So I need to call my plugin after the payment has been success or failed



Related Questions


How to set Ogone Ingenico after payment back urls?

Updated August 06, 2015 15:04 PM


Order collection in plugin not working

Updated April 14, 2018 14:09 PM