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