File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
app/code/Magento/Rule/Model/Condition/Product Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -657,23 +657,11 @@ public function validateByEntityId($productId)
657
657
* Retrieve category ids where product is available
658
658
*
659
659
* @param int $productId
660
- * @return array
660
+ * @return int[]
661
661
*/
662
662
protected function _getAvailableInCategories ($ productId )
663
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
- );
664
+ return $ this ->productCategoryList ->getCategoryIds ($ productId );
677
665
}
678
666
679
667
/**
You can’t perform that action at this time.
0 commit comments