data['orderQuantity']) ? $this->data['orderQuantity'] : null; $itemsIds = isset($this->data[static::IMPORT_ITEMS_IDS_PARAM]) ? $this->data[static::IMPORT_ITEMS_IDS_PARAM] : null; if (empty($itemsIds)) { return array(); } $this->items = $this->getItemsByOrderItemsIds($itemsIds, $orderQuantity); } private function getItemsByOrderItemsIds($itemsIds, $orderQuantity) { $orderId = wc_get_order_id_by_order_item_id(intval($itemsIds[0])); return $this->getOrderItemsProducts(array($orderId), $orderQuantity, $itemsIds); } }