REST API Categories problem
-
Hello,
I’m trying to import some products through the REST API to my WooCommerce site.
I’ve already created a category tree within my site.
For example suppose it’s like this:
Shoes->subcategories(Male,Female)
T-shirts->subcategories(Male,Female)Now when I try to add a product (through the REST API, not the UI) I only can associate it to a category by name.
(e.g. I can write Shoes,Female)
But I have no certainty that I’m referring to the “Female” subcategory of “Shoes”.
In this example it would make no sense, but what if I want to refer to the “Female” subcategory of “T-shirts”?
Is there a way to send something like an ID of the category?
I’ve tried passing numbers, but it simply creates categories named something like “150”, using the id as a name.(I’m using the documentation as a reference https://woothemes.github.io/woocommerce-rest-api-docs/#products-properties)
Thanks!
- The topic ‘REST API Categories problem’ is closed to new replies.