Added Klaviyo back in stock trigger to product pages, but now have empty labels appearing on product pages of items that are in stock. How do I fix that? Thanks!
hii @paigehb
The empty label is showing because the is always being rendered, even when the product is in stock.
Right now you have:
Since it’s not wrapped in a condition, it outputs an empty element.
Fix
Wrap it inside a Shopify availability condition so it only appears when the product is sold out:
{% unless product.available %}
{% endunless %}
or
{% if product.available == false %}
{% endif %}
This will prevent the empty label from appearing on in-stock products.
If it still shows, also check your CSS for .productlabel` adding height/background even when empty.
Thanks
You should share a link to your store and a preview password if one is set.
It is possible that some CSS conflict between Klaviyo and your theme or another app makes this label visible even if it should not – this is impossible to diagnose without seeing your store.

