You are here

function commerce_shipping_post_update_3 in Commerce Shipping 8.2

Create the 'checkout' form/view mode and displays for the shipment entity.

File

./commerce_shipping.post_update.php, line 99
Post update functions for Shipping.

Code

function commerce_shipping_post_update_3() {

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