#Acidon

1 messages · Page 1 of 1 (latest)

daring fableBOT
olive mulch
#

Hello! Sorry for the wait - can you share an example Event ID I can take a look at? I would've expected that code to work, so I'm a bit surprised

restive gorge
#

evt_1NC3X9AJgdWvE57h3XG8di3x

I can see the 'product' field populated in dashboard for this event.

I was able to extract the root properties without any issues too:

$customer_id = $object['customer'];

olive mulch
#

AH I think I see what you're missing. You probably want
$product_id = $object['lines']['data'][0]['price']['product'];

restive gorge
#

Perfect, that fixed it.
Its strange that there is no [0] shown in dashboard for this event.

olive mulch
#

yeah, it's because data is an array, so it's just represented slightly different when you look at it in the dashboard

restive gorge
#

Ahh, I see the brackets now, thx for your help!

olive mulch
#

👍