Type
magento2-module
Magento 2 module to decrease/increase product stock after invoice/creditmemo creation event
magento2-module
MIT
None
None
None
None
None
A simple Magento 2 extension that uses the sales_order_invoice_pay
and 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