function uc_attribute_node_delete in Ubercart 8.4
Same name and namespace in other branches
- 6.2 uc_attribute/uc_attribute.module \uc_attribute_node_delete()
- 7.3 uc_attribute/uc_attribute.module \uc_attribute_node_delete()
Implements hook_node_delete().
File
- uc_attribute/
uc_attribute.module, line 246 - Ubercart Attribute module.
Code
function uc_attribute_node_delete($node) {
$connection = \Drupal::database();
$connection
->delete('uc_product_options')
->condition('nid', $node
->id())
->execute();
$connection
->delete('uc_product_adjustments')
->condition('nid', $node
->id())
->execute();
$connection
->delete('uc_product_attributes')
->condition('nid', $node
->id())
->execute();
}