function hook_uc_order_product_delete in Ubercart 8.4
Same name and namespace in other branches
- 7.3 uc_order/uc_order.api.php \hook_uc_order_product_delete()
Responds after order product deletion.
This hook is invoked after the order product has been removed from the database.
Parameters
\Drupal\uc_order\OrderProductInterface $order_product: The order product that is being deleted.
See also
hook_uc_order_edit_form_product_remove()
File
- uc_order/
uc_order.api.php, line 196 - Hooks provided by the Order module.
Code
function hook_uc_order_product_delete(OrderProductInterface $order_product) {
$connection = \Drupal::database();
$connection
->delete('mytable')
->condition('opid', entity_id('uc_order_product', $order_product))
->execute();
}