You are here

function hook_commerce_shipping_service_rate_options_alter in Commerce Shipping 7.2

Allows modules to alter generated options array.

Alter array to select a shipping service on the checkout form.

The options values for the shipping service radio buttons defaults to show the display title of the shipping service and price. If you need to add additional information for your shipping services or alter the apperance of other modules' shipping services, you can use this hook to do so with the order object available.

The options array is keyed by the shipping service name and matches the keys in the $order->shipping_rates array containing shipping line items for rates calculated for the order.

Parameters

array $options: The options array used to select a calculated shipping rate.

object $order: The order the options array was generated for.

See also

commerce_shipping_service_rate_options()

1 invocation of hook_commerce_shipping_service_rate_options_alter()
commerce_shipping_service_rate_options in ./commerce_shipping.module
Turns an array of shipping rates into a form element options array.

File

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

Code

function hook_commerce_shipping_service_rate_options_alter(&$options, $order, &$form_state) {

  // No example.
}