Closed
Description
Preconditions
1.Magento version: 2.2.6
2. PHP 7.1.x
3. Completely clean install with no demo data
Steps to reproduce
- Create new observers for events sales_order_item_save_commit_after and sales_order_save_commit_after.
- Complete checkout as guest user.
Expected result
- Events have fired.
- Observers have processed events.
Actual result
- Events have not fired.
Additional information
For guest checkout there are two additional transactions open in 'GuestPaymentInformationManagement'.
These transactions lead to fact that transaction level will never be set less than '2' and after commit callback will not be processed.
Possible fix
Transactions were opened to solve issue with QTY concurrency while order is placing (concurrent order placement could lead to negative stock value).
So, possible, issue could be fixed by moving \Magento\CatalogInventory\Observer\SubtractQuoteInventoryObserver to Sales Order Save transaction.