Magento 2 Get shipping and billing address of customer after order placed?
Solved my problem by following edit in below file:
/vendor/magento/module-sales/view/frontend/templates/email/items.phtml
$_order = $block->getOrder()
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$formatedAddress = $objectManager->get('\Magento\Sales\Model\Order\Email\Sender\OrderSender');
print_r($formatedAddress->getFormattedBillingAddress($_order));
print_r($formatedAddress->getFormattedShippingAddress($_order));
You can add this piece of code in the file:
<?php /** @var $_order \Magento\Sales\Model\Order */ ?>
<?php $_order = $block->getOrder() ?>
<?php $billingAddress = $_order->getBillingAddress(); ?>
<?php $shippingAddress = $_order->getShippingAddress(); ?>
With $billingAddress
now you can get address
e.g:
<?php echo $billingAddress->getStreet() ?>