Storefront API orders line item variant return null

RemiLPE
Tourist
5 0 1

Hello,

I am using Storefront API to get the order history of the users, then I list the different line_items. But some line_items have the variants object to null, I need this object because it contains several information.

RemiLPE_0-1623656032872.png

RemiLPE_0-1623656164028.png

 

Do you know why some line_item have the variants object to null?

Thank you.

0 Likes
Jason
Shopify Expert
10360 158 2004

Fair to assume that the items missing no longer exist in the shop? So the reference being nullified would be a reflection of that.

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes
RemiLPE
Tourist
5 0 1

Hello Jason,

Thank you for your answer but this is not the case for all products. Some old products are no longer available, but others recent products are still available but with an empty object variant. 

0 Likes