also tried this route,
…/wp-json/wc/v3/products/brands/61
but returned with
{
“code”: “rest_no_route”,
“message”: “No route was found matching the URL and request method”,
“data”: {
“status”: 404
}
}
Hi manigopal!
Info about the api usage here: REST API docs
🙂
i have seen this but how do i call it.. all i need is that when i click on particular brand it should list all products attached to it.
something like this, /wp-json/wc/v3/products?brand=62
@titodevera
Brands API works but i do look for filter kind of API,
Say for eg. products?category=15 @ here this API displays / filters products which are mapped to particular category.
As mentioned above i do look for the same
eg. products?brand=62 which is an extended API, which is now(not working)
But /wc/v2/brands => this works fine by displaying the brands list.
exactly for this,
http://website.com/brand/aachi/ ~ in this it does displays the particular brands product’s
im waiting for almost two weeks. could you share the api for it.
wp-json/wc/v1/products?filter[brand]=62
tried different combination of attributes but nothing worked 🙁
tried with these keys,
wp-json/wc/v2/products?filter[brand]=nestle
wp-json/wc/v2/products?filter[brand]=62
wp-json/wc/v2/brands/nestle
wp-json/wc/v2/brands/62
Is there any way to get a brand by name through REST API? I see the API docs but it doesn’t have anything like that.
wp-json/wc/v3/brands?name=brand1
wp-json/wc/v3/brands?slug=brand1
Hi Guys,
Did you make API for brands work? It would be really helpful.
I just take a deeper look and I found that inside the pluing’s folder there is file / class? called class-perfect-woocommerce-brands.php, in there there is a function called get_brands, that is the function called when try to use brands endpoint (http://HOSTNAME/wp-json/wc/v3/brands).
github class link
I dont know much about php but seems to me that the function used to get the brands is not returning any data. I printed brands collection when get_brands is executed and it was empty.
Does anyone around know more about php and woocommerce development to take a look?
-
This reply was modified 6 years, 3 months ago by
manuken.