0

I have a CRM set to crm.example.com And a active store on example.com (on the same server) Both running with NGINX.

Im trying to request the whole categories list (43 categories) but i'm getting only 10. (The default value set by WooCommerce).

I tried using the per_page parameter but it seems like the server is ignore the GET.

I checked the request sent from crm.example.com and got that:

object(Automattic\WooCommerce\HttpClient\Request)#85 (5) {
  ["url":"Automattic\WooCommerce\HttpClient\Request":private]=>
  string(67) "https://example.com/wp-json/wc/v2/products/categories/?per_page=100"
  ["method":"Automattic\WooCommerce\HttpClient\Request":private]=>
  string(3) "GET"
  ["parameters":"Automattic\WooCommerce\HttpClient\Request":private]=>
  array(1) {
    ["per_page"]=>
    int(100)
  }
  ["headers":"Automattic\WooCommerce\HttpClient\Request":private]=>
  array(2) {
    ["Accept"]=>
    string(16) "application/json"
    ["User-Agent"]=>
    string(32) "WooCommerce API Client-PHP/1.3.0"
  }
  ["body":"Automattic\WooCommerce\HttpClient\Request":private]=>
  string(0) ""
}

But yet there is only 10 results.

i'm thinking maybe the NGINX server is ignoring the GET parameters as a security policy?

2
  • Im using nginx with standard setup, it's getting me crazy because the same code is working just fine while the store and the Backend are on Apache Commented Apr 17, 2018 at 14:46
  • After hours of research I Found my answer here Commented Apr 17, 2018 at 16:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.