Reputation: 75
i tried all solution available on stackoverflow about filter products bycategory and i'm creating react native app and used node js, none of the are working.
/products?filter[categories]=${item.slug}${Constants.Keys}
/products?category=${item.slug}${Constants.Keys}
can somebody tell me how filter works on woocommerce REST API in node js??
Upvotes: 1
Views: 1724
Reputation: 689
if there is a list of all product with something like category_id in there product json you should use something like that
this.state.data.filter(category_id==x)
but i guess your doing something wrong which is not typing in strings like :
http://www.example.com/wp-json/wc/v1/products?category=${item.id}
Upvotes: 1