We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3adb7a commit d8a386eCopy full SHA for d8a386e
app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php
@@ -657,23 +657,11 @@ public function validateByEntityId($productId)
657
* Retrieve category ids where product is available
658
*
659
* @param int $productId
660
- * @return array
+ * @return int[]
661
*/
662
protected function _getAvailableInCategories($productId)
663
{
664
- return $this->_productResource->getConnection()
665
- ->fetchCol(
666
- $this->_productResource->getConnection()
667
- ->select()
668
- ->distinct()
669
- ->from(
670
- $this->_productResource->getTable('catalog_category_product'),
671
- ['category_id']
672
- )->where(
673
- 'product_id = ?',
674
- $productId
675
- )
676
- );
+ return $this->productCategoryList->getCategoryIds($productId);
677
}
678
679
/**
0 commit comments