I try to add custom action for generate PDF file for merchant (marketplace), like in the backend (Shipment > Action > PDF Shipments).
Try to call function in the backend but it request shipments collection (location: Magento\Module-sales\Model\Order\Pdf\Shipment.php
)
Right now I have order collection but don't know how to get shipment collection?
Best Answer
You can get shipment collection from order object like this :
$order->getShipmentsCollection();