Home » Php » php – wocommerce REST API json primary data query

php – wocommerce REST API json primary data query

Posted by: admin February 25, 2020 Leave a comment

Questions:

When creating woocommerce REST API and querying with json (firebox browser) is shown the Objects as follows:

[
    0: {…}
        
    1: {…}
    2: {…}
]

our customer need for further processing the array ‘data’ when queried:

 [ data:
          
    0: {…}
          
    1: {…}
          
    2: {…}
  ]  


https://example.net/wp-json/wc/v3/orders/?consumer_key=...... 

is there a way to get to the primary data array via the query?

How to&Answers: