Commit 675d9703 authored by Trent Crawford's avatar Trent Crawford Committed by Jonathan Sacksick
Browse files

Issue #3323736: PaymentOrderUpdator should run before kernel destructor and not refresh orders

parent 007d9285
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -92,6 +92,12 @@ class PaymentOrderUpdater implements PaymentOrderUpdaterInterface, DestructableI
    if (!$previous_total->equals($new_total)) {
      $order->setTotalPaid($new_total);
      if ($save_order) {
        // The order should not be refreshed on save as this service
        // may run in a queue or webhook where order processors and
        // conditions will not have access to the user's session.
        // However, the user's session may be required for the refresh to
        // function correctly.
        $order->setRefreshState(OrderInterface::REFRESH_SKIP);
        $order->save();
      }
    }