A space to discuss online store customization, theme development, and Liquid templating.
In our liquid template, we check if `product.selling_plan_groups.size > 0` (confirming a product has a selling plan group attached) and display some HTML if so. We recently started getting reports that the HTML was not being rendered. After further investigation, we found that if the `cache` was cleared then `product.selling_plan_groups` would be empty even if the product has a selling plan group attached. So a first-time visitor to a merchant's store would not see the HTML since `product.selling_plan_groups` has a size of 0.
We have replicated the issue on Chrome, Firefox, and Safari for the Dawn and Debut themes.
This is a serious issue. I don't know why this hasn't been looked at. Many merchants are starting to reach out to our support about it. For years it has worked just fine. Nothing has changed on our end in terms of using liquid objects to display some selling plan groups. Other apps do this and even some themes as well. Everyone is affected, merchants, customers, app developers. This needs to be fixed...
Hi Etra - will post updates for this issue in your original post here: https://community.shopify.com/c/shopify-functions/product-selling-plan-groups-array-liquid-is-someti...
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog