Just tried this locally and it seems to be working fine. Are you running the latest package versions?
When inspecting the product admin page the checkbox for hide when out of stock is ticked despite this value in the database for both procuct and variant being false. I think the issue is that the value on the page is being passed as a string and JavaScript treats the non-empty string "0" as truthy, checkboxChecked: true variantValue: "0" ← string, not boolean variantType: "string" productValue: false
Currently running core 0.61.0 and admin 1.63.0
Setting the variant value in the database to null removes the tick on the admin page.
So the bulk action is working fine for you? I'm not following with the checkbox stuff as the variant has a dropdown and not a checkbox? I've just tried changing the values for the product and variant and saving in different combinations and everything seems fine locally. Got any steps to replicate or any pictures/videos of what you mean?
Sorry I think the bulk action was a red herring, looks like it was infact updating however with the variants value being set to 0 the product page was stuck with this option ticked in the interface.
For single products it looks like the variant value is overriding the product value.
So if you run the bulk action against single prodcuts and set variants Hide when out of Stock to be false then check a single product.
I'm not too sure this is a bug because even simple products have a variant behind the scenes, that does take priority for things like this. I would suggest using the "type" filter for simple products if you'd wish to target specifically simple products with any bulk action
Are you able to replicate the problem with a single product where the variant Hide when out of Stock value is set to 0 in the database resulting in the product showing the hide when out of stock value being ticked?
Sorry for not following, I was too focused on the bulk action. I can see now that when the product db value is true but the variant db value is false it remains ticked as it's a string. I've released a fix for this. Thanks for finding and helping to fix this
Log in to join the discussion.