Line Item Properties coming in as a hash

Solved
Highlighted
Tourist
13 0 1

I have an issue where some orders have the line item properties come in as a hash, as opposed to an array.

So far we have only seen this on one store, and it is one old orders, but it is consistent and persists across api versions.

Having the properties comes in as a hash does not match our model of Shopify's api and while we could put in a way to handle this, I would like some confirmation that this is expected or at least is not an issue that will be fixed in the near future.

Has anyone else run into this issue?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 166

Hey @Samuel_Moddapps,

 

Can you link me to an example order?

0 Likes
Highlighted
Tourist
13 0 1

Hi Scotty,

 

Sure thing, 

order id: 185122903

shop: tradlands.myshopify.com

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 166

Thanks @Samuel_Moddapps

 

This order is from 2013, I notice the order before it is also using hashes. I wonder if this applied to all old orders. Recent orders appear to be using arrays (as they should be). Do you have any examples of recent orders using hashes? Otherwise I think it's safe to assume new orders will be using arrays. You might need some additional logic to handle these older orders.

0 Likes
Highlighted
Tourist
13 0 1

It was just those old orders; I think there we a few that did use arrays, but those are not an issue. 

Is there a reason these old orders have hashes, or is it just a bug?

If it is a bug, is there any kind of timeline on it being fixed (I realise it is probably low priority as it is a small issue)?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 166

This is an accepted solution.

At one point in time line item properties were hashes. You'll need to update your app to handle both.

0 Likes