Skip to content

How to get ordered product CGST, SGST & IGST from order in magento 2

enter image description here

how to get this amount?
I try –

foreach ($_order->getAllVisibleItems() as $item) {
$productId = $item->getProductId();
$productName = $item->getName();
$productSku = $item->getSku();
$Price = $item->getPrice();
$qtyOrdered = intval($item->getQtyOrdered());
}