I've tried out a bunch of the answers on here and figure this should be really simple.. trying to get into a hook for a woo pdf export plugin to integrate with ACF..
If I run this -
echo $this->order
I get this -
{"id":7,"parent_id":0,"status":"processing","currency":"GBP","vers
How can I pull out just the id aka first item?
Many thanks!
SOLUTION:
As per below essentially, the code I used that works is..
$thisOrd = $this->order;
$obj = json_decode($thisOrd);
echo $obj->id;
Thanks All.
json_decode()in the manual