WooCommerce-REST-API-Client-Library icon indicating copy to clipboard operation
WooCommerce-REST-API-Client-Library copied to clipboard

How to use ; rel="next", ; rel="last" in my php script?

Open ddhara opened this issue 8 years ago • 0 comments

I am using below code to get orders but only 10 orders coming at a time so how can I get other orders? How can I use :rel = "next", :rel = "last" which I am getting in response?

<?php

require_once( 'lib/woocommerce-api.php' );

$options = array(
	'debug'           => true,
	'return_as_array' => false,
	'validate_url'    => false,
	'timeout'         => 30,
	'ssl_verify'      => false,
);

try {

	$client = new WC_API_Client( 'http://your-store-url.com', 'ck_enter_your_consumer_key', 'cs_enter_your_consumer_secret', $options );
	
	$data = $client->orders->get();
	
}

?>

ddhara avatar May 25 '17 07:05 ddhara