HTTP GET, How to Access Line Data?

[ad_1]

Hey there,

I’m working on pulling information for our recent orders and I’m trying to access some line items properties, however, I’m struggling to nest the appropriate parameters.

So far I’ve got this:
var surl = website + "/wp-json/wc/v3/orders" + "?per_page=50" + "&_fields[]=id" + "&_fields[]=line_items";

I’m trying to pull sub-properties from line_items such as name, SKU, but I’m struggling to do so in terms of getting a single field. I thought I’d just be able to do something like line_items.name or line_items.name.value but no luck. If anyone can point me in the right direction I’d really appreciate it.

I did find this but I’m not sure if it applies.

Thanks!

  • This topic was modified 5 hours, 16 minutes ago by joedunning.
  • This topic was modified 5 hours, 15 minutes ago by joedunning.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer