function commerce_addressbook_modules_enabled in Commerce Addressbook 7
Implements hook_modules_enabled().
@TODO: do we really need this? What if a customer profile is being added that doesn't have an addressfield, or doesn't need the saved addresses feature?
File
- ./
commerce_addressbook.module, line 253 - :
Code
function commerce_addressbook_modules_enabled($modules) {
// Loop through all the enabled modules.
foreach ($modules as $module) {
// If the module implements hook_commerce_customer_profile_type_info()
// add the saved addresses field to it
if (module_hook($module, 'commerce_customer_profile_type_info')) {
$profile_types = module_invoke($module, 'commerce_customer_profile_type_info');
// Loop through and configure the customer profile types defined by the module.
foreach ($profile_types as $type => $profile_type) {
commerce_addressbook_configure_customer_profile_type($profile_type);
}
}
}
}