Draft orders no longer showing item properties

Hi,

We’ve been using the Ruby Shopify API to create draft orders with line items attached with properties since the Shopify admin interface doesn’t support adding line item properties. For a couple of months this has been working fine and draft orders created in this way would display line item properties on the Shopify admin draft order interface. However recently the properties have stopped being shown despite no changes to our code. Strangely the properties still show up for draft orders created on our development store which we use for testing, it’s just on our live site that the properties have stopped showing up.

Any help would be greatly appreciated.

Thank you

1 Like
  1. Can you confirm that you’re using the same API version between both shops?
  2. Got the code that you’re sending in a way that can be shared?
  3. Have a very (very) recent request id from a header?

All the questions!

No problem!

The private apps we are running to interact with the Admin API are using 2020-07 (both dev and live).

Here are the relevant code excerpts from our Rails server:

# application.rb (excerpt)
ShopifyAPI::Base.api_version = '2020-07'
ShopifyAPI::Base.site = "https://#{api_key}:#{password}@#{config.shop_name}.myshopify.com/admin"

# some_controller.rb (excerpt)
line_item = ShopifyAPI::LineItem.new
line_item.variant_id = variant[:id]
line_item.properties = [
    {
        name: 'Custom Code',
        value: item[:code]
    }
]
line_item.quantity = item[:qty]
line_items.push(line_item)

order = ShopifyAPI::DraftOrder.new
order.line_items = line_items
order.save

Here is a screenshot from the dev store admin of an order created using the above (with some anonymization):

And here is a screenshot from the live store admin:

One thing we have observed is that on our live store, the admin interface is slightly different in styling and that might have something to do with it. Also, not sure what is meant by request id but if you can elaborate I may be able to provide that too. Thanks!

It could be a little bit outdate, but do you find the solution yet?