You are here

function commerce_file_modules_enabled in Commerce File 7

Implements hook_modules_enabled().

  • Add our default line item file field to the line item types.
  • Rebuild license info cache if any enabled modules implements hook

File

./commerce_file.module, line 607
Provides integration of file licenses with Commerce

Code

function commerce_file_modules_enabled($modules) {

  // Configure line item fields for all line item types
  commerce_file_configure_line_item_fields($modules);

  // Reset license info cache
  $info_reset = FALSE;
  foreach ($modules as $module) {

    // If the module implements hook_commerce_file_license_info()...
    if (module_hook($module, 'commerce_file_license_info')) {
      _commerce_file_collate_license_info_rebuild();
      break;
    }
  }
}