Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter manigopal

    (@manigopal)

    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
    }
    }

    Plugin Contributor titodevera

    (@titodevera)

    Hi manigopal!

    Info about the api usage here: REST API docs

    ??

    Thread Starter manigopal

    (@manigopal)

    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.

    Thread Starter manigopal

    (@manigopal)

    something like this, /wp-json/wc/v3/products?brand=62

    Thread Starter manigopal

    (@manigopal)

    @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.

    Thread Starter manigopal

    (@manigopal)

    exactly for this,

    https://website.com/brand/aachi/ ~ in this it does displays the particular brands product’s

    Thread Starter manigopal

    (@manigopal)

    im waiting for almost two weeks. could you share the api for it.

    Thread Starter manigopal

    (@manigopal)

    wp-json/wc/v1/products?filter[brand]=62

    tried different combination of attributes but nothing worked ??

    Thread Starter manigopal

    (@manigopal)

    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

    manuken

    (@manuken)

    Hi Guys,

    Did you make API for brands work? It would be really helpful.

    manuken

    (@manuken)

    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 (https://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 5 years ago by manuken.
Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘API Issue’ is closed to new replies.