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:onOrderStockChange event

Triggered by Shop_OrderStatusLog
Author LemonStand eCommerce Inc.

Event handler signature

public boolean event_onOrderStockChange(Shop_Order $order, Shop_OrderStatus $status)
$order Shop_Order specifies the order object.
$status Shop_OrderStatus specifies a new order status object.
{return} boolean returns TRUE if the inventory update should be cancelled.
Triggered before LemonStand updates inventory for products of a specific order. You can cancel the inventory update process by returning TRUE from the the event handler. Event handler example:
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onOrderStockChange', $this, 'on_stock_change');
}

public function on_stock_change($order, $status)
{
  // Do something

  ...

  // Return TRUE to suppress the default LemonStand inventory update
  return true;
}