File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
app/code/Magento/Catalog/Model/ResourceModel Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -469,10 +469,6 @@ protected function _saveCategoryProducts($category)
469
469
470
470
if (!empty ($ insert ) || !empty ($ delete )) {
471
471
$ productIds = array_unique (array_merge (array_keys ($ insert ), array_keys ($ delete )));
472
- $ this ->_eventManager ->dispatch (
473
- 'catalog_category_change_products ' ,
474
- ['category ' => $ category , 'product_ids ' => $ productIds ]
475
- );
476
472
477
473
$ category ->setChangedProductIds ($ productIds );
478
474
}
@@ -484,6 +480,10 @@ protected function _saveCategoryProducts($category)
484
480
* Setting affected products to category for third party engine index refresh
485
481
*/
486
482
$ productIds = array_keys ($ insert + $ delete + $ update );
483
+ $ this ->_eventManager ->dispatch (
484
+ 'catalog_category_change_products ' ,
485
+ ['category ' => $ category , 'product_ids ' => $ productIds ]
486
+ );
487
487
$ category ->setAffectedProductIds ($ productIds );
488
488
}
489
489
return $ this ;
You can’t perform that action at this time.
0 commit comments