You are here

function xquantity_stock_update_8201 in Commerce Extended Quantity 8

Install the Rotate stock system action.

File

modules/xquantity_stock/xquantity_stock.install, line 32
Install and uninstall functions for the xquantity_stock module.

Code

function xquantity_stock_update_8201() {
  $config = \Drupal::configFactory();
  $name = 'system.action.variation_xquantity_stock_rotate';
  if ($configuration = $config
    ->getEditable($name)) {
    $data = Yaml::decode(file_get_contents(__DIR__ . "/config/install/{$name}.yml"));
    $configuration
      ->setData($data)
      ->save();
  }
}