function commerce_option_entity_delete in Commerce Product Option 7
Same name and namespace in other branches
- 7.2 commerce_option.module \commerce_option_entity_delete()
Implementation of hook_entity_delete
Delete all options, when the associated line item is deleted.
File
- ./
commerce_option.module, line 219
Code
function commerce_option_entity_delete($entity, $type) {
if ($type == 'commerce_line_item') {
db_delete('commerce_option')
->condition('line_item_id', $entity->line_item_id)
->execute();
}
}