I tried to get all products (17) by woocommerce rest API:

require_once('WooCommerce/vendor/autoload.php');

use AutomatticWooCommerceClient;

$woocommerce = new Client(
    'http://***', 
    'ck_***', 
    'cs_*'
);

$results = $woocommerce->get('products', [], ['per_page'=>17]); 

var_dump($results);

But returns 10 results.

Please advice what is wrong?

We have 17 active products on our woocommerce website.

Read more here: woocommerce rest api, always return 10 results


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: