Feature: #840 - Events before and after a status change of orders
See Issue 840
Description
The Status (#838) dispatches two new events when it changes
the payment or the shipping status of an order:
\Extcode\Cart\ Event\ Order\ Before Status Change Event - Dispatched before the change with the order, the payment or the shipping,
the old and the new status, the source, the initiator and the backend user.
Listeners can prevent the change with
veto, the reason is shown as flash message in the order details of the backend module.('reason') \Extcode\Cart\ Event\ Order\ After Status Change Event - Dispatched after the status was changed and written to the order history, e.g. to send an email or to create a shipping label. The uid of the stored change identifies the change, so a listener can execute an action only once.
Status returns the result object
\Extcode\ with the outcome (the enum
Status, with the new case Vetoed), the reason of a veto
and the stored change.
See Events.
Impact
Extensions can react on status changes of orders and prevent them.