My site has 10 main categories. But when I run the query, only 3 main categories and their subcategories are listed. Other categories don’t come up with what could be the problem?

  • does it only show categories which are assigned to posts/pages? – am_ Feb 7 '19 at 19:43
  • The product does not come in categories. only the first 3 categories and sub-categories are coming. – erknertn Feb 7 '19 at 22:06

am_ is correct, rest API categories has hide_empty default to true. change your request to the following: /wp-json/wc/v3/products/categories?hide_empty=false


| improve this answer | |
  • unfortunately did not work – erknertn Feb 7 '19 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.