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?

  • 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 – david pugatcsh Apr 17 '18 at 14:46
  • After hours of research [I Found my answer here](https://stackoverflow.com/questions/12654521/why-is-nginx-is-ignoring-my-query-strings) – david pugatcsh Apr 17 '18 at 16:52

0 Answers0