You are here

public function OrderRefreshInterface::needsRefresh in Commerce Core 8.2

Checks whether the given order needs to be refreshed.

An order needs to be refreshed:

  • If a refresh was explicitly requested via $order->setNeedsRefresh() due to the order being modified.
  • If it was not refreshed today (date changes can affect tax rate amounts, promotion availability)
  • If it was not refreshed for longer than the refresh frequency.

Parameters

\Drupal\commerce_order\Entity\OrderInterface $order: The order.

Return value

bool TRUE if the order needs to be refreshed, FALSE otherwise.

1 method overrides OrderRefreshInterface::needsRefresh()
OrderRefresh::needsRefresh in modules/order/src/OrderRefresh.php
Checks whether the given order needs to be refreshed.

File

modules/order/src/OrderRefreshInterface.php, line 58

Class

OrderRefreshInterface
Runs order refresh on draft orders.

Namespace

Drupal\commerce_order

Code

public function needsRefresh(OrderInterface $order);