Hi there, I am creating product variants at discounted price to offer based on certain conditions. I'm doing this with the API and appending a metafield property "hidden": true for this variants.
I need to hide from all the pages in my store all the product variants tagged with the hidden property on metafields.
Is there any way to do this?
Thanks in advance.
I assume you are mostly interested in hiding the variants on product pages. In that case you locate the liquid file responsible for displaying product variants on your product page (theme specific) and use liquid code to exclude the variants when rendering the variants dropdown. You might also want to ensure there are no AJAX calls to Shopify to populate the variants dynamically, in that case you might need to do the filtering/hiding for the results received.