function commerce_line_item_delete in Commerce Core 7
Deletes a line item by ID.
Parameters
$line_item_id: The ID of the line item to delete.
boolean $skip_order_save: TRUE to skip saving the order after deleting the line item.
Return value
TRUE on success, FALSE otherwise.
2 calls to commerce_line_item_delete()
- commerce_cart_order_product_line_item_delete in modules/
cart/ commerce_cart.module - Deletes a product line item from a shopping cart order.
- commerce_line_item_manager_validate in modules/
line_item/ commerce_line_item.module - Validation callback for a commerce_line_item_manager element.
File
- modules/
line_item/ commerce_line_item.module, line 643 - Defines the core Commerce line item entity and API functions interact with line items on orders.
Code
function commerce_line_item_delete($line_item_id, $skip_order_save = FALSE) {
return commerce_line_item_delete_multiple(array(
$line_item_id,
), $skip_order_save);
}