As question from @jafar-pinjar regarding custom order status, setState and setStatus calls can ...
newState = Order::STATE_COMPLETE; $order->setState($newState)->setStatus( Order::COMPLETE); $order->save(); I use the obove code to ...
... $orderRepository; } public function ChangeOrderStatusToComplete() { $ completeStatus = \Magento\Sales\Model\Order::STATE_COMPLETE; $id = 2; try{ ...
calling setState correctly (forgot hyphen "-") using $order>setState(), ...
$orderId = 1271; //check if the order exists with this id or not $objectManager = \ Magento\Framework\App\ObjectManager::getInstance(); $order ...
Using Magento ver. 2.0.7 I am trying to use this code to change order to the status of "Processing", but i get an error, i think i am.
... case 0: $orderState = Order::STATE_PENDING; $order->setState($orderState )->setStatus(Order::STATE_PENDING); $order->save(); break; ...
You programmatically set state, then the order gets moved to another state ...
... solution for how I can update the order status in Magento 2? $orderId = 1; $ objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $ order ...
Related searches. order setstate magento 2 · magento order getstate.