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

Triggered by Shop_ShippingParams
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onGetShippingParams(Shop_ShippingParams $params)
$params Shop_ShippingParams a reference to the Shop_ShippingParams object loaded from the database.
Allows to override the store shipping parameters. The event handler should accept a single argument - the shipping parameters object loaded from the database. To override the parameters the method should return the updated object. Note that the updated parameters will be used in all subsequent calls. If you want the original parameters to be unchanged you may want to clone the shipping parameters object inside the handler and return the updated clone.
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onGetShippingParams', $this, 'get_shipping_params');
}

public function get_shipping_params($params)
{
  $result = clone $params;
  $result->sender_first_name = 'John';

  return $result;
}