You are here

function commerce_recurring_post_update_5 in Commerce Recurring Framework 8

Add the new 'Subscription orders (customer)' view and customer facing suscription view displays.

File

./commerce_recurring.post_update.php, line 121
Post update functions for Commerce Recurring.

Code

function commerce_recurring_post_update_5() {

  /** @var \Drupal\commerce\Config\ConfigUpdaterInterface $config_updater */
  $config_updater = \Drupal::service('commerce.config_updater');
  $result = $config_updater
    ->import([
    'views.view.commerce_subscription_orders_customer',
    'core.entity_view_mode.commerce_subscription.customer',
    'core.entity_view_display.commerce_subscription.product_variation.customer',
    'core.entity_view_display.commerce_subscription.standalone.customer',
  ]);
  $message = implode('<br>', $result
    ->getFailed());
  return $message;
}