Woocommerce RestAPI set filter in PHP code

Question

I tried to get all the data from my woocomerce store and set filter but not been able to execute only got a single row value by the below mentioned code::

$results = $woocommerce->get(‘orders’);

echo “

";
print_r($results[2]->{'billing'}->{'first_name'});
echo"
"; print_r($results[2]->{'meta_data'}[2]->{'value'}); echo "

“;
In this case only got the value which are available at array number 3. if I could get all the data that would have done my job as well.

I want to show the data in my custom PHP application’s Table where data will be shown only billing’s first_name and meta_data zonename which is available on array number 3 in meta_data

Please let me know where is my fault.

0
, Codecraker 9 months 2020-06-24T10:11:00-05:00 0 Answers 77 views 0

Leave an answer