You are here

function uc_quote_uc_order_update in Ubercart 8.4

Implements hook_uc_order_update().

1 call to uc_quote_uc_order_update()
Quotes::applyQuote in shipping/uc_quote/src/Plugin/Ubercart/OrderPane/Quotes.php
Ajax callback: Manually applies a shipping quote to an order.

File

shipping/uc_quote/uc_quote.module, line 240
The controller module for fulfillment modules that process physical goods.

Code

function uc_quote_uc_order_update(OrderInterface $order) {
  if (isset($order->quote['method'])) {
    $connection = \Drupal::database();
    $connection
      ->merge('uc_order_quotes')
      ->key([
      'order_id' => $order
        ->id(),
    ])
      ->fields([
      'method' => $order->quote['method'],
      'accessorials' => $order->quote['accessorials'],
      'rate' => $order->quote['rate'],
    ])
      ->execute();
  }
}