I am trying to retrieve all products using rest api. I have read this question. I am using postman to make calls. Here is my query
https://squatwolf.com/wp-j
This isn't the latest API endpoint:
/wc-api/v3/products?filter[limit]=
You have to fetch page per page to get all the products:
$page = 1;
$products = [];
$all_products = [];
do{
try {
$products = $wc->get('products',array('per_page' => 100, 'page' => $page));
}catch(HttpClientException $e){
die("Can't get products: $e");
}
$all_products = array_merge($all_products,$products);
$page++;
} while (count($products) > 0);