public function updateShippingAddress(ResourceControllerEvent $event): void
    {
        /** @var Order $order */
        $order = $event->getSubject();

        $pickup = $this->getPickupAddress($order);

        if (!empty($pickup)) {
            $shipping = clone $order->getShippingAddress();
            $shipping->setCompany($pickup['company']);
            $shipping->setStreet($pickup['street_1']);
            $shipping->setCity($pickup['city']);
            $shipping->setPostcode($pickup['postcode']);
            $shipping->setCountryCode($pickup['country']);

            $order->setShippingAddress($shipping);
        }
    }
public function updateShippingAddress(ResourceControllerEvent $event): void
    {
        /** @var Order $order */
        $order = $event->getSubject();

        $pickup = $this->getPickupAddress($order);

        if (!empty($pickup)) {
            $shipping = clone $order->getShippingAddress();
            $shipping->setCompany($pickup['company']);
            $shipping->setStreet($pickup['street_1']);
            $shipping->setCity($pickup['city']);
            $shipping->setPostcode($pickup['postcode']);
            $shipping->setCountryCode($pickup['country']);

            $order->setShippingAddress($shipping);
        }
    }
public function updateShippingAddress ( ResourceControllerEvent $ event ) : void { /** @var Order $order */ $ order = $ event -> getSubject ( ) ; $ pickup = $ this -> getPickupAddress ( $ order ) ; if ( ! empty ( $ pickup ) ) { $ shipping = clone $ order -> getShippingAddress ( ) ; $ shipping -> setCompany ( $ pickup [ 'company' ] ) ; $ shipping -> setStreet ( $ pickup [ 'street_1' ] ) ; $ shipping -> setCity ( $ pickup [ 'city' ] ) ; $ shipping -> setPostcode ( $ pickup [ 'postcode' ] ) ; $ shipping -> setCountryCode ( $ pickup [ 'country' ] ) ; $ order -> setShippingAddress ( $ shipping ) ; } }
Update Shipping Address on cart summary

@param ResourceControllerEvent $event
@return void
Update Shipping Address on cart summary