shopp_calculate_shipping

called when shipping options are calculated.

add_action('shopp_calculate_shipping', [callback]);

@param array $options a reference to the current set of shipping options that have been calculated from earlier shipping modules.
@param Order $Order a reference to the current order object, including the cart contents and totals.

Description

Runs the shipping modules aggregate shipping calculations. Passed the Cart Shipping options and the Order object. The shipping addon modules make use of this action to add their own shipping options to the list of shipping options available for the order.

Example

add_action('shopp_calculate_shipping', 'my_function', 10, 2);
function my_function ( &$options, $Order ) {
// calculate my shipping options
// ...
// add your shipping options to the options available
$options[] = $my_new_option;
}

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar