function commerce_node_checkout_update_7000 in Commerce Node Checkout 7
Make sure we've migrated from References to Entity reference.
File
- ./
commerce_node_checkout.install, line 74 - Provides install, update, schema and uninstall hooks for the module
Code
function commerce_node_checkout_update_7000() {
// Load the reference field used for nodes
if ($field = field_info_field('commerce_node_checkout_node')) {
// Make sure it's the right type
if ($field['type'] == 'entityreference') {
// We're good
return;
}
}
throw new DrupalUpdateException('You must migrate from References to Entity reference. Please refer to this module and guide: https://drupal.org/project/entityreference_migration');
}