You are here

function hook_commerce_shipping_method_collect_rates in Commerce Shipping 7.2

Allows modules to add shipping rates to an order object.

Shipping rates will be added for the specified shipping method for use in building the shipping service checkout pane.

This function is typically called via the Rules action "Collect rates for a shipping method" attached to a default Rule. The hook functions just like hook_commerce_shipping_collect_rates() but requests shipping rates added to the order only be for the specified shipping method.

Parameters

string $method: The machine-name of the shipping method shipping rate collection should be limited to.

object $order: The order whose shipping rates should be collected.

See also

hook_commerce_shipping_collect_rates()

commerce_shipping_method_collect_rates()

1 invocation of hook_commerce_shipping_method_collect_rates()
commerce_shipping_method_collect_rates in ./commerce_shipping.module
Collects available shipping services of the specified method for an order.

File

./commerce_shipping.api.php, line 151
Contains API for commerce shipping module.

Code

function hook_commerce_shipping_method_collect_rates($method, $order) {

  // No example.
}