You are here

function hook_commerce_physical_entity_weight_field_name_alter in Commerce Physical Product 7

Allows modules to specify a different weight field name for the given entity than the one determined by Commerce Physical Product.

Parameters

&$field_name: The name of the field instance on the entity that is currently specified as the weight field to use in weight calculations.

$entity_type: The type of entity the field is attached to.

$entity: The actual entity whose weight value is being determined.

See also

commerce_physical_entity_weight_field_name()

1 invocation of hook_commerce_physical_entity_weight_field_name_alter()
commerce_physical_entity_weight_field_name in ./commerce_physical.module
Determines the weight field to use for a given entity.

File

./commerce_physical.api.php, line 23
Hooks provided by the Commerce Physical Product module.

Code

function hook_commerce_physical_entity_weight_field_name_alter(&$field_name, $entity_type, $entity) {

  // No example.
}