function hook_uc_order_product_insert in Ubercart 8.4
Same name and namespace in other branches
- 7.3 uc_order/uc_order.api.php \hook_uc_order_product_insert()
Responds when an order product is inserted.
This hook is invoked after the order product is inserted into the database.
Parameters
\Drupal\uc_order\OrderProductInterface $order_product: The order product that is being inserted.
See also
File
- uc_order/
uc_order.api.php, line 144 - Hooks provided by the Order module.
Code
function hook_uc_order_product_insert(OrderProductInterface $order_product) {
db_insert('mytable')
->fields([
'id' => entity_id('uc_order_product', $order_product),
'extra' => print_r($order_product, TRUE),
])
->execute();
}