LemonStand Documentation

shop:onOrderStatusChanged event

The shop:onOrderStatusChanged event is triggered just after an order has changed its status. The event handler should accept 3 parameters: the order object (Shop_Order), the new status object (Shop_OrderStatus), and the identifier of the previous order status.

Event handler example:

public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onOrderStatusChanged', $this, 'process_status_change');
}
 
public function process_status_change($order, $new_status, $prev_status_id)
{
  if ($new_status->code == 'paid')
    // Do something
}

Next: shop:onNewInvoiceItemCopy event
Previous: shop:onOrderBeforeStatusChanged event
Return to Handling LemonStand events