简体   繁体   中英

Shopify - xml does not show the value of the attribute

I have a screen which uses the Shopify API to display pending orders. I added a cart attribute to show the preferred pick up time of their order. This was working fine up until a few weeks ago. Now the xml that I use to display the attribute does not show the value of the attribute on my screen (although it is still being sent through to the admin area).

The code I used to echo the attribute was: < ?php=$xml->{'note-attributes'}->{'note-attribute'}->value ? >

Has there been some changes in the Shopify API over the last couple of weeks? If so what should I now change this code to?

I ran into this as well. I'm not sure if it was intentional or not, but the XML looks like this coming into my webhook:

<note-attributes type="array">
<note_attribute>

Note that it is note_attribute, with an underscore. I assumed that individual members of that array would be note-attribute as well, but apparently they're not. I have no idea if this is by design or not...

I hope this helps,

Matt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM