The preOrderStatusUpdate hook is called before the order status is updated.
Parameters
\Isotope\Model\ProductCollection\Order $order
The order model.
\Isotope\Model\OrderStatus $newStatus
The new order status.
array $updates
The order status updates.
Return Values
Return true to cancel the order status change.
Example
// src/EventListener/Isotope/PreOrderStatusUpdateListener.php
namespaceApp\EventListener\Isotope;useIsotope\Model\OrderStatus;useIsotope\Model\ProductCollection\Order;useIsotope\ServiceAnnotation\IsotopeHook;/**
* @IsotopeHook("preOrderStatusUpdate")
*/classPreOrderStatusUpdateListener{publicfunction__invoke(Order$order,OrderStatus$newsStatus,array$updates):bool{// Cancel the order status change if the order is not paid.
if(!$order->isPaid()){returntrue;}returnfalse;}}