I am creating a module where I am adding an observer to the event
sales_order_save_after which checks the order status and then sends an invoice e-mail.
However, the event is only valid if the order is saved, e.g. create a shipment. This is not what I need.
Is there an event to catch an order status change (the order status is changed from processing to complete after an API push call).
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name='sales_order_save_after'> <observer name='vendor_autoinvoice_send_invoice' instance='Vendor\AutoInvoice\Model\Observer\AutoInvoice'/> </event> </config>