Some issue with basic stock management since the last release
-
Hi,
I just noted that all my bundles now behave like they would all allow backorders, but non of my products or bundles does.
To reproduce the issue just create a very basic bundle out of 2 products qty 1 each, do not change any settings just use the default. When you visit the product page you can basically add as many products as you would cause the qty input is not restricted with min/max.
The issue was introduced with the changeset https://plugins.trac.www.ads-software.com/changeset/3168564/ in class-product.php. when i simply comment out the lines 279-281 THIS IS where the issue happens as you continue the loop if the individual items in the bundles have enough stock and therefore you return backorders = true as set before the loop, cause the actual state of the items is never checked before the continue, everything is good again.
As a Programmer you can easily spot the issue:
In https://plugins.trac.www.ads-software.com/browser/woo-product-bundle/trunk/includes/class-product.php?rev=3103660#L259 everything is still ok!
In https://plugins.trac.www.ads-software.com/browser/woo-product-bundle/trunk/includes/class-product.php?rev=3168564#L259 you added the continue if the product is on stock. BUT backorders is set to true before the loop. So if everything is on stock the loop just always triggers continue and never checks if the individual products are allowed for backorder instead just returns the initial true value.
Can you please check that? I would like to be able to have bundles that don’t allow backorders!
Cheers,
Paul
- You must be logged in to reply to this topic.