hook_alloc_get_items($txn)
ecommerce-5--4/docs/developer/hooks/ec_receipt.php, line 319
The allocation object provider returns the items of the allocation object. Eg. store returns the product items from the transaction object.
| Name | Description |
|---|---|
| Hooks | Allow modules to interact with the Drupal core. |
<?php
function hook_alloc_get_items($txn) {
if (!empty($txn->items) && is_array($txn->items)) {
store_alloc_build_items($txn, 'init');
$items = array_map('store_alloc_build_items', $txn->items);
return $items;
}
}
?>