You are here

protected function IncrementStockAction::doExecute in Ubercart 8.4

Increases the stock of ordered products.

Parameters

\Drupal\uc_order\OrderInterface $order: The order entity.

File

uc_stock/src/Plugin/RulesAction/IncrementStockAction.php, line 31

Class

IncrementStockAction
Provides a 'Increment stock' action.

Namespace

Drupal\uc_stock\Plugin\RulesAction

Code

protected function doExecute(OrderInterface $order) {
  if (is_array($order->products)) {
    array_walk($order->products, [
      $this,
      'incrementCallback',
    ], $order);
  }
}