You are here

function commerce_line_item_delete_multiple in Commerce Core 7

Deletes multiple line items by ID.

Parameters

$line_item_ids: An array of line item IDs to delete.

boolean $skip_order_save: TRUE to skip saving the order after deleting the line item.

Return value

TRUE on success, FALSE otherwise.

3 calls to commerce_line_item_delete_multiple()
commerce_line_item_delete in modules/line_item/commerce_line_item.module
Deletes a line item by ID.
commerce_line_item_field_attach_delete in modules/line_item/commerce_line_item.module
Implements hook_field_attach_delete().
commerce_line_item_ui_delete_orphaned_line_items in modules/line_item/includes/commerce_line_item_ui.admin.inc
Batch callback: deletes 50 orphaned line items at a time.

File

modules/line_item/commerce_line_item.module, line 658
Defines the core Commerce line item entity and API functions interact with line items on orders.

Code

function commerce_line_item_delete_multiple($line_item_ids, $skip_order_save = FALSE) {
  return entity_get_controller('commerce_line_item')
    ->delete($line_item_ids, NULL, $skip_order_save);
}