function hook_line_item_data_alter in Ubercart 6.2
Alters the line item definitions declared in hook_line_item().
Parameters
&$items: The combined return value of hook_line_item().
1 invocation of hook_line_item_data_alter()
- _line_item_list in uc_order/
uc_order.line_item.inc - Builds a list of line items defined in the enabled modules.
File
- docs/
hooks.php, line 714 - These are the hooks that are invoked by the Ubercart core.
Code
function hook_line_item_data_alter(&$items) {
foreach ($items as &$item) {
// Tax amounts are added in to other line items, so the actual tax line
// items should not be added to the order total.
if ($item['id'] == 'tax') {
$item['calculated'] = FALSE;
}
elseif ($item['id'] == 'tax_subtotal') {
$item['callback'] = NULL;
}
}
}