File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
app/code/Magento/CatalogRule Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ public function afterSave(
35
35
\Magento \Catalog \Model \Category $ result
36
36
) {
37
37
/** @var \Magento\Catalog\Model\Category $result */
38
- $ productIds = $ result ->getAffectedProductIds ();
39
- if ($ productIds && !$ this ->productRuleProcessor ->isIndexerScheduled ()) {
38
+ $ productIds = $ result ->getChangedProductIds ();
39
+ if (! empty ( $ productIds) && !$ this ->productRuleProcessor ->isIndexerScheduled ()) {
40
40
$ this ->productRuleProcessor ->reindexList ($ productIds );
41
41
}
42
42
return $ result ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ protected function setUp()
32
32
);
33
33
$ this ->subject = $ this ->createPartialMock (
34
34
\Magento \Catalog \Model \Category::class,
35
- ['getAffectedProductIds ' , '__wakeUp ' ]
35
+ ['getChangedProductIds ' , '__wakeUp ' ]
36
36
);
37
37
38
38
$ this ->plugin = (new ObjectManager ($ this ))->getObject (
@@ -46,7 +46,7 @@ protected function setUp()
46
46
public function testAfterSaveWithoutAffectedProductIds ()
47
47
{
48
48
$ this ->subject ->expects ($ this ->any ())
49
- ->method ('getAffectedProductIds ' )
49
+ ->method ('getChangedProductIds ' )
50
50
->will ($ this ->returnValue ([]));
51
51
52
52
$ this ->productRuleProcessor ->expects ($ this ->never ())
@@ -60,7 +60,7 @@ public function testAfterSave()
60
60
$ productIds = [1 , 2 , 3 ];
61
61
62
62
$ this ->subject ->expects ($ this ->any ())
63
- ->method ('getAffectedProductIds ' )
63
+ ->method ('getChangedProductIds ' )
64
64
->will ($ this ->returnValue ($ productIds ));
65
65
66
66
$ this ->productRuleProcessor ->expects ($ this ->once ())
You can’t perform that action at this time.
0 commit comments