You are here

public function PaymentOrderUpdater::updateOrders in Commerce Core 8.2

Updates and saves all relevant orders.

Overrides PaymentOrderUpdaterInterface::updateOrders

1 call to PaymentOrderUpdater::updateOrders()
PaymentOrderUpdater::destruct in modules/payment/src/PaymentOrderUpdater.php
Performs destruct operations.

File

modules/payment/src/PaymentOrderUpdater.php, line 53

Class

PaymentOrderUpdater

Namespace

Drupal\commerce_payment

Code

public function updateOrders() {
  if (!empty($this->updateList)) {
    $order_storage = $this->entityTypeManager
      ->getStorage('commerce_order');

    /** @var \Drupal\commerce_order\Entity\OrderInterface[] $orders */
    $orders = $order_storage
      ->loadMultiple($this->updateList);
    foreach ($orders as $order) {
      $this
        ->updateOrder($order, TRUE);
    }
  }
}