Cross posting this here as I think I posted it in the wrong section.
In checkout.liquid I need to know if a product is being purchased on a subscription basis. However, line_item.selling_plan_allocation always seems to be nil, so the below outputs nothing.
{%- for line_item in checkout.line_items -%}
{%- if line_item.selling_plan_allocation != nil -%}
{{ line_item.product.title }} has selling plan name {{ line_item.selling_plan_allocation.selling_plan.name }}.
{%- endif -%}
{%- endfor -%}
How should I be accessing the selling plan information for products in the order at checkout? Thanks for any help.