/** * Update order's shipping state. * * @param OrderInterface $order * @param string $transition */ public function updateOrderShipmentStates(OrderInterface $order, $transition = ShipmentTransitions::SYLIUS_PREPARE) { if ($order->isBackorder()) { $transition = ShipmentTransitions::SYLIUS_BACKORDER; } $this->processor->updateShipmentStates($order->getShipments(), $transition); }
/** * Update shipment states after order is created. * * @param GenericEvent $event */ public function updateShipmentStatesOnhold(GenericEvent $event) { $this->shippingProcessor->updateShipmentStates($this->getOrder($event)->getShipments(), ShipmentTransitions::SYLIUS_HOLD); }