I want to fetch items from skus. Can anyone suggest me how to do.
The code I am following - The sku i am getting in the variable $productSkus.
private function fetchProducts(array $orderItems): array
{
$productIds = [];
foreach ($orderItems as $orderItem) {
$productIds[] = $orderItem->getProductId();
$productSkus[] = $orderItem->getSku();
}
} Now, i want to get all items from the skus array