Magento – Get product attributes from Order

magento-2.1ordersPHPproduct-attribute

I need to get product attributes for product items in Order. How can I do this?
I got order details per one order from below line of code and I used loop to cycle through every order.

$orderObj = $objectManager->create('Magento\Sales\Model\Order')->load($orderID);

I need to get certain attribute value from each item in the order. I tried getAllvisibleitems as follows,

$items =$orderObj->getAllVisibleItems();

but it doesn't include data for the attributes. For example I need to get value from attribute manufacturer,

How can I get manufacturer of each item in the order?

Best Answer

Please try to get all product attributes by

$orderObj = $objectManager->create('Magento\Sales\Model\Order')->load($orderID);
$orderAllItems = $orderObj->getAllItems();
if ($orderAllItems) {
    foreach ($orderAllItems as $item) {
        $customatt = $item->getProduct()->getCustomAtt();
    }
}

Thanks