Can you provide a little more context? What is the purpose of the loop? Display other bundles? If so, you should use a meta query instead of the condition.
I create badgets via an ACF custom taxonomy. For example: “Popular”, “Hot” etc.
These taxonomies are displayed in a loop on the product card. If the product is sold out (_wc_pb_bundle_stock_quantity <= 0), then I no longer need the badges (the complete div) and would like to show another “Sold out” badge instead.
Ok. If you wrap the loop with a div and apply the condition there, it should work, right?
If the condition is directly on the loop, the dd tag refers to the loop item (the badges) - not to the product itself.
Ok, thanks for the quick clarification. Even if I didn’t quite understand it.
I do understand that the condition refers to something else. But I don’t understand why - it makes it look like a UX error. But you know what you’re doing