You are here

function uc_order_uninstall in Ubercart 8.4

Same name and namespace in other branches
  1. 5 uc_order/uc_order.install \uc_order_uninstall()
  2. 6.2 uc_order/uc_order.install \uc_order_uninstall()
  3. 7.3 uc_order/uc_order.install \uc_order_uninstall()

Implements hook_uninstall().

File

uc_order/uc_order.install, line 249
Install, update and uninstall functions for the uc_order module.

Code

function uc_order_uninstall() {
  $statuses = OrderStatus::loadMultiple(NULL);
  if (!empty($statuses)) {
    foreach ($statuses as $status) {

      // Unlock OrderStatus configuration entity so it can be deleted.
      $status
        ->setLocked(FALSE)
        ->save();
    }
  }
}