Skip to content

[bugfix/fallback-to-proceed-when-disabled]:+ fallback to proceed when module store-config is disabled - #24

Open
haimanti-dekker wants to merge 1 commit into
elgentos:masterfrom
haimanti-dekker:bugfix/fallback-to-proceed-when-disabled
Open

[bugfix/fallback-to-proceed-when-disabled]:+ fallback to proceed when module store-config is disabled#24
haimanti-dekker wants to merge 1 commit into
elgentos:masterfrom
haimanti-dekker:bugfix/fallback-to-proceed-when-disabled

Conversation

@haimanti-dekker

Copy link
Copy Markdown

Description

When the module's store config cataloginventory/options/inventory_enabled is disabled, isModuleEnabled() returns false. The aroundCorrectItemsQty plugin then skips both the custom movement->correctItemsQty() and $proceed(), silently preventing native stock subtraction on order placement.

Orders complete without errors, but cataloginventory_stock_item.qty is never decremented.

Fix

Add an else branch that calls $proceed() when the store config is disabled, so correctItemsQty executes as expected if module is disabled for any reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant