In this post I am going to explain how to get shipment details by shipment id in Magento 2.

Using below code snippet you can get shipment details by passing shipment id.

1. Using Dependency Injection

Add below code snippet in Block class.

Add below code snippet in template file.

 

2. Using Object Manager