#million1156-checkout-lineitem-expansion-data-array
1 messages · Page 1 of 1 (latest)
Hello million1156, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
• million1156, 56 minutes ago, 11 messages
thanks :)
Anyway, when I try to get the productName, session.line_items.data.price.product.name;, it returns this: TypeError: Cannot read properties of undefined (reading 'product')
Can you log out the line_items data in the response?
oh
You're missing the array index on data
try:
session.line_items.data[0].price.product.name
data is an array/list of line item objects
each one has price etc
... I cannot believe I forgot that
Thank you so much, my brain isn't working today :P
It happens! NP 😄
