Magento 2 how to get Ordered product category id
My problem is i have same product with multiple category so i want know which category product i place order based on order id
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Model\Order')
->loadByIncrementId('000000004');
$orderItems = $order->getAllItems();
foreach ($orderItems as $item) {
echo "<pre>";
echo $itemQty = $item->getProductId();
?>