function commerce_pricing_attributes_enable in Commerce Pricing Attributes 7
Implements hook_enable
This is required to ensure that this module hooks are executed after the ones of commerce_product_bundle.
File
- ./
commerce_pricing_attributes.module, line 9
Code
function commerce_pricing_attributes_enable() {
$weight = db_select('system', 's')
->fields('s', array(
'weight',
))
->condition('name', 'commerce_product_bundle', '=')
->execute()
->fetchField();
if (isset($weight)) {
db_update('system')
->fields(array(
'weight' => $weight + 1,
))
->condition('name', 'commerce_pricing_attributes', '=')
->execute();
}
}