You are here

function commerce_shipping_method_instance_id in Commerce Shipping 7

Returns a shipping method instance ID given a shipping method ID and the Rule containing an enabling action with settings.

Parameters

$method_id: The ID of the shipping method.

$rule: The Rules configuration object used to provide settings for the method.

Return value

A string used as the shipping method instance ID.

1 call to commerce_shipping_method_instance_id()
commerce_shipping_enable_method in ./commerce_shipping.rules.inc
Generic execution callback for the shipping method.

File

./commerce_shipping.module, line 263
Defines the shipping system and checkout integration.

Code

function commerce_shipping_method_instance_id($method_id, $rule) {
  $parts = array(
    $method_id,
    $rule->name,
  );
  return implode('|', $parts);
}