You are here

function commerce_bpc_field_delete_instance in Commerce Bulk Product Creation 7

Same name and namespace in other branches
  1. 7.2 commerce_bpc.module \commerce_bpc_field_delete_instance()

Implements hook_field_delete_instance().

Rebuilds the menu so that the menu item under /admin/commerce/add-bulk is removed if the product type is no longer available for bulk creation.

File

./commerce_bpc.module, line 194

Code

function commerce_bpc_field_delete_instance($instance) {
  if ($instance['entity_type'] == 'commerce_product') {
    variable_set('menu_rebuild_needed', TRUE);
  }
}