This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

shop:onOrderStatusChanged event

Triggered by Shop_OrderStatusLog
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onOrderStatusChanged(Shop_Order $order, Shop_OrderStatus $status, integer $prev_status_id)
$order Shop_Order specifies the order object.
$status Shop_OrderStatus specifies a new order status object.
$prev_status_id integer specifies a previous order status identifier.
Triggered after an order has changed its 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
}