You are here

function commerce_order_post_update_13 in Commerce Core 8.2

Create the "billing" form mode for profiles.

File

modules/order/commerce_order.post_update.php, line 208
Post update functions for Order.

Code

function commerce_order_post_update_13() {
  if (EntityFormMode::load('profile.billing')) {
    return '';
  }

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