function uc_order_delete_line_item in Ubercart 5
Same name and namespace in other branches
- 8.4 uc_order/uc_order.line_item.inc \uc_order_delete_line_item()
- 6.2 uc_order/uc_order.line_item.inc \uc_order_delete_line_item()
- 7.3 uc_order/uc_order.line_item.inc \uc_order_delete_line_item()
Delete a line item, or pass $order as TRUE and $id as an order_id to delete every line item attached to an order.
3 calls to uc_order_delete_line_item()
- uc_order_delete in uc_order/
uc_order.module - Deletes an order and tells other modules to do the same.
- uc_order_pane_line_items in uc_order/
uc_order_order_pane.inc - Handle the "Line Items" order pane.
- uc_taxes_order in uc_taxes/
uc_taxes.module - Update and save tax line items to the order.
File
- uc_order/
uc_order_line_item.inc, line 88 - This file contains the callbacks for the default line items for orders and the various functions that make line items work.
Code
function uc_order_delete_line_item($id, $order = FALSE) {
if ($order === FALSE) {
db_query("DELETE FROM {uc_order_line_items} WHERE line_item_id = %d", $id);
}
else {
db_query("DELETE FROM {uc_order_line_items} WHERE order_id = %d", $id);
}
return TRUE;
}