Magento 2 get formatted billing & shipping address

If you want to get formatted billing & shipping address, please follow below code:

You can use this code for getting the formatted billing & shipping address:

$_order = $block->getOrder();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$formatedAddress = $objectManager->get('\Magento\Sales\Model\Order\Email\Sender‌​\OrderSender');
print‌​_r($formatedAddress-‌​>getFormattedBilling‌​Address($_order)); 
print_r($formatedAddress->getFormattedShippingAddress($_orde‌​r));

Please leave your comment for asking any question or suggestion.

Need Help?

Magento 2 get formatted billing & shipping addressexpoundsofttechsolution Event Methods in jQuery