Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WooCommerce "product_cat" taxonomy is not working #356

Open
jancikviktor opened this issue Oct 23, 2020 · 5 comments
Open

WooCommerce "product_cat" taxonomy is not working #356

jancikviktor opened this issue Oct 23, 2020 · 5 comments

Comments

@jancikviktor
Copy link

jancikviktor commented Oct 23, 2020

Hello, I am trying to GET (and after that I need to use POST) for Product categories based on WooCommerce.

I'm trying for products, it works fine, I got this after getting output;

{ "id": 31876, "acf": { "supplier": "wt", "tax_val_wt": "20", "cost_base_wt": "100", "cost_tax_wt": "120", "stock_qty_wt": "2.5", "ext": "test" } }

but for product_cat I get; every time

{ "code": "rest_no_route", "message": "Not found", "data": { "status": 404 } }

Is it possible to get product categories? Because I found out in sepcs that it should be working with; /wp-json/acf/v3/{taxonomy}/product_cat

Thank you, Victor.

@mhadaily
Copy link

Hi,
I have faced the exact same issue today, just wondering if you already have a solution if not, how and where can we start investigating to see if we can add this to this amazing plugin ?

@jancikviktor
Copy link
Author

No, I didn't resolve it yet. We already decided to use directly post_meta in MySQL DB to insert these parameters, it seems that it is a better way, we're finishing it now.

@chanceproth
Copy link

I am also stumped on something similar, but I think I might have more information...

It seems you can do...
xx.com/wp-json/acf/v3/product
xx.com/wp-json/acf/v3/product/XXX
xx.com/wp-json/acf/v3/categories/XXX

But for me getting the whole category list does not work...
xx.com/wp-json/acf/v3/categories

I get an empty array, so it seems like it wants to be a valid endpoint.

Any relevant advice would be helpful.

@chanceproth
Copy link

After more investigation, it looks like the call to...
xx.com/wp-json/acf/v3/categories

Only returns post categories with ACF and does not include any product categories.

But calls to...
xx.com/wp-json/acf/v3/categories/[Post-or-Product_cat_id]
works as expected and returns a post cat with ACF or a product_car with ACF.

Would love to find an endpoint or solution to this. Seems like it's very close.

@Astraport
Copy link

POST acf data via /wp-json/acf/v3/categories/ not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants