You are here

function xquantity_stock_uninstall in Commerce Extended Quantity 8

Implements hook_uninstall().

File

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

Code

function xquantity_stock_uninstall() {
  $config = \Drupal::configFactory();
  $configurations = [
    'system.action.variation_xquantity_stock_adjust',
    'system.action.variation_xquantity_stock_set',
    'system.action.variation_xquantity_stock_rotate',
  ];
  foreach ($configurations as $name) {
    if ($configuration = $config
      ->getEditable($name)) {
      $configuration
        ->delete();
    }
  }
}