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 154ad6f commit a7a44d9Copy full SHA for a7a44d9
1 file changed
src/services/Inventory.php
@@ -422,9 +422,8 @@ public function executeUpdateInventoryLevels(UpdateInventoryLevelCollection $upd
422
423
// TODO: Potentially move this to a job in the queue
424
// Update all purchasables stock
425
- $purchasables = $updateInventoryLevels->getPurchasables();
426
- if ($purchasables) {
427
- Plugin::getInstance()->getPurchasables()->updateStoreStockCache($purchasables[0], true);
+ foreach ($updateInventoryLevels->getPurchasables() as $purchasable) {
+ Plugin::getInstance()->getPurchasables()->updateStoreStockCache($purchasable, true);
428
}
429
430
// Trigger event for each successful update
0 commit comments