/** * @param StoreEntity $store * @param $collectionId * @return ShopifyProductEntity */ public function getProductCountByCollection(StoreEntity $store, $collectionId) { $this->setSettings($store); $response = $this->client->getProductCount(['collection_id' => $collectionId]); return $response['count']; }