0

I want to add multiple customer billing address and fetch all customer billing address programmatically.

Please help me in this.

1

You can only set 1 default billing address within magento but you can add additional addresses to get the customers address's you can do this by using Magento\Customer\Api\Data\CustomerInterfaceFactory and with implimenting the below code

$customer = $this->_customerRepository->getById($customerId);
$addresses = $customer->getAddresses(); // Returns Array
  • Issue is resolved. thanks! – Masud Shaikh Aug 22 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.