You are here

function hook_uc_order_product_insert in Ubercart 7.3

Same name and namespace in other branches
  1. 8.4 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

object $order_product: The order product that is being inserted.

See also

hook_entity_insert()

File

uc_order/uc_order.api.php, line 434
Hooks provided by the Order module.

Code

function hook_uc_order_product_insert(object $order_product) {
  db_insert('mytable')
    ->fields(array(
    'id' => entity_id('uc_order_product', $order_product),
    'extra' => print_r($order_product, TRUE),
  ))
    ->execute();
}