You are here

function commerce_product_post_update_2 in Commerce Core 8.2

Revert the default order item form display.

File

modules/product/commerce_product.post_update.php, line 27
Post update functions for Product.

Code

function commerce_product_post_update_2() {
  if (!\Drupal::moduleHandler()
    ->moduleExists('commerce_order')) {
    return '';
  }

  /** @var \Drupal\commerce\Config\ConfigUpdaterInterface $config_updater */
  $config_updater = \Drupal::service('commerce.config_updater');
  $result = $config_updater
    ->revert([
    'core.entity_form_display.commerce_order_item.default.default',
  ]);
  $message = implode('<br>', $result
    ->getFailed());
  return $message;
}