Magento 2 module to decrease/increase product stock after invoice/creditmemo creation event
A simple Magento 2 extension that uses the
sales_order_creditmemo_refund events to decrease/increase product quantity. It also adjusts the product stock status.
Result: stock is not decreased (reserved) for unpaid orders.
In vanilla Magento 2.2, the product stock is 'reserved' (substracted) when an order is placed, so we'll have to disable this system so we can replace it with our own.
Set 'Decrease Stock When Order is Placed' to 'No' to disable. You can find it here: Stores > Inventory > Stock Options
Install via composer:
comoser require vendic/magento2-stock-change-after-payment
Vendic develops technically challenging e-commerce websites using Magento 2, as well as innovative headless PWA shops. Feel free to check out our projects on our website.