If set order status Hold programmatically and if i am trying to unhold From Admin Then order status empty.
https://prnt.sc/k2g1ak
Here is my code for set Hold order status:
$orderState = Order::STATE_HOLDED;
$order->setState($orderState)->save();
if($order->canHold()) {
$order->hold()->save();
}
Is there any another way for set order status as hold? what am I doing wrong? and why order status empty?
Best Answer
I found correct way for set order status HOLD