예제 #1
0
 /**
  * Declare order shipping address
  *
  * @param \Magento\Sales\Model\Order\Address $address
  * @return $this
  */
 public function setShippingAddress(\Magento\Sales\Model\Order\Address $address)
 {
     $old = $this->getShippingAddress();
     if (!empty($old)) {
         $address->setId($old->getId());
     }
     $address->setEmail($this->getCustomerEmail());
     $this->addAddress($address->setAddressType('shipping'));
     return $this;
 }