You are here

function commerce_product_delete in Commerce Core 7

Deletes a product by ID.

Parameters

$product_id: The ID of the product to delete.

Return value

TRUE on success, FALSE otherwise.

2 calls to commerce_product_delete()
CommerceProductCRUDTestCase::testCommerceProductCrud in modules/product/tests/commerce_product.test
Test the product CRUD functions.
commerce_product_product_delete_form_submit in modules/product/includes/commerce_product.forms.inc
Submit callback for commerce_product_product_delete_form().

File

modules/product/commerce_product.module, line 584
Defines the core Commerce product entity, including the entity itself, the bundle definitions (product types), and various API functions to manage products and interact with them through forms and autocompletes.

Code

function commerce_product_delete($product_id) {
  return commerce_product_delete_multiple(array(
    $product_id,
  ));
}