AmpersandHQ / magento2-disable-stock-reservation

This module disables the inventory reservation logic introduced as part of MSI in Magento 2.3.3
GNU Lesser General Public License v3.0
211 stars 60 forks source link

Change SourceDeductionService class in the Refund observer #91

Closed markfischmann closed 1 year ago

markfischmann commented 1 year ago

Change a class in the refund observer to use the module's own SourceDeductionService instead of the native one. This causes refunds to not change stock status in cataloginventory_stock_item, cataloginventory_stock_status and inventory_source_item if the product goes from "out of stock" to "in stock" following a refund.

Instead of using the vendor/ampersand/magento2-disable-stock-reservation/src/Model/SourceDeductionService/PatchedSourceDeductionService.php class, it used the vendor/magento/module-inventory-source-deduction-api/Model/SourceDeductionService.php class.