Commit 5dfb7734 authored by facine's avatar facine Committed by bojanz

Issue #3104196 by facine, bojanz: Update functions should protect against a...

Issue #3104196 by facine, bojanz: Update functions should protect against a missing "customer" profile type
parent ff92243a
......@@ -16,6 +16,26 @@ function commerce_order_install() {
user_role_grant_permissions(AccountInterface::AUTHENTICATED_ROLE, ['view own commerce_order']);
}
/**
* Implements hook_update_dependencies().
*/
function commerce_order_update_dependencies() {
if (!\Drupal::moduleHandler()->moduleExists('commerce_product')) {
return [];
}
$dependencies = [];
// Make sure commerce_order_update_8207 is executed after
// commerce_product_update_8209, so that the 'stores' and 'variations'
// configurable fields are converted to base fields before the
// commerce_number_pattern module is enabled.
$dependencies['commerce_order'][8207] = [
'commerce_product' => 8209,
];
return $dependencies;
}
/**
* Add the 'data' field to 'commerce_order_item' entities.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment