You are here

protected function SetOrderStatus::doExecute in Ubercart 8.4

Updates an order's status.

Parameters

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

string $status: The order status.

File

uc_order/src/Plugin/RulesAction/SetOrderStatus.php, line 44

Class

SetOrderStatus
Provides a 'Set order status' action.

Namespace

Drupal\uc_order\Plugin\RulesAction

Code

protected function doExecute(OrderInterface $order, $status) {
  $order
    ->setStatusId($status)
    ->save();
}