Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Maarten van Grootel commented on Orders line item variant_id fields are null

$
0
0

Hi Dan,

This is by design. When a product variant is deleted, the variant_id on line_items that have this product variant is nullified. The reason is that we can't keep direct references around to objects that no longer exist. 

We retain the variant_title (and some other information) on that line_item to show to merchants. That way when they look at old orders with deleted or changed variants, they still have all the information at the time of the purchase.

Also, variant ID is not required. For example when a shop does a direct sale via POS, there is not a product or variant involved, and the field will be null.


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>