protected function DecrementStockAction::doExecute in Ubercart 8.4
Decreases the stock of ordered products.
Parameters
\Drupal\uc_order\OrderInterface $order: The order entity.
File
- uc_stock/
src/ Plugin/ RulesAction/ DecrementStockAction.php, line 30
Class
- DecrementStockAction
- Provides a 'Decrement stock' action.
Namespace
Drupal\uc_stock\Plugin\RulesActionCode
protected function doExecute(OrderInterface $order) {
if (is_array($order->products)) {
array_walk($order->products, 'uc_stock_adjust_product_stock', $order);
}
}