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

Triggered by Shop_Order
Author LemonStand eCommerce Inc.

Event handler signature

public boolean event_onOrderSupportsInvoices(Shop_Order $order)
$order Shop_Order specifies the order object.
{return} boolean returns TRUE if invoices are supported by the order. Returns FALSE otherwise.
Allows to enable the invoice support for a specific order. By default the invoice support is disabled, but some modules, for example Subscriptions Module, require it. When the invoice support is enabled for specific order, the Order Preview form displays the Invoices tab, which contains a list of the order invoices.
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onOrderSupportsInvoices', $this, 'eval_order_supports_invoices');
}

public function eval_order_supports_invoices($order)
{
  foreach ($order->items as $item)
  {
    if ($item->product)
    {
      if ($item->product->subscription_plan)
        return true;
    }
  }

  return false;
}