Possible Bug with Draft Product and Cart
-
I think I may have found a bug with how the plugin/woocommerce handles bundled products which have previously been added to a cart but move to draft status since.
Normally if a product is in a user’s cart but is moved to draft status before they checkout woocommerce removes the product from their cart automatically. What I’ve found is that if a user adds a bundled product to their cart but doesn’t complete checkout, and an admin then moves the product in draft status – the parent product is removed from cart but the bundled products remain orphaned in the cart as “ghost items”, i.e they’re not visible in the cart and they aren’t charged for, but they appear in the admin dashboard.
This had been a problem for a client of mine because their accounting and warehouse operated in isolation, so there were times when the warehouse would see these “ghost items” on the print out and pack the order, unaware that the items had not been paid for.
I have been able to resolve this by hooking into checkout and looping over cart items to check if any bundled products are orphaned(their bundle parent is not present in the cart), but I think this warrants some further investigation and a fix as it could lead to loss of income for stores.
- The topic ‘Possible Bug with Draft Product and Cart’ is closed to new replies.