cancel
Showing results for 
Search instead for 
Did you mean: 

How to save billing and shipping address programmatically?

How to save billing and shipping address programmatically?

Hi All,

 

Can any one tell me how to save billing and shipping address programatically in magento version 2.0. I have tried saving addressid as billing id and shipping id to customer attribute called default_shipping.

 

Also any query to get the data from custom table..

 

 

Thanks,

Kishan Singh

1 REPLY

Re: How to save billing and shipping address programmatically?

Magento\Checkout\Model\PaymentInformationManagement


  public function savePaymentInformationAndPlaceOrder(
        $cartId,
        \Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
        \Magento\Quote\Api\Data\AddressInterface $billingAddress = null
    )


The  billingAddress is passed as second argument.

Chris, Magento Developer, https://www.chrisranjana.com