When is CartLine.sellingPlanAllocation null?

While trying to reproduce an issue reported by a merchant, I noticed in the Shopify Functions error log that every line item in the cart had CartLine.sellingPlanAllocation set to null.

The Order Discount Functions API doesn’t have documentation about when it is supposed to be null.

When is CartLine.sellingPlanAllocation null?

If sellingPlanAllocation is null, what should we assume? Is the line item a one time purchase, or a subscription?

Thanks in advance.

Hi @tobebuilds

Lack of sellingPlanAllocation should indicate that there is no selling plan – no subscription, down payment, etc. Just a regular purchase.

https://shopify.dev/docs/apps/selling-strategies/subscriptions/selling-plans

-Nick

Hi Nick, thanks for your response. I’ll default to handling line items as one-time purchases when there is no selling plan.