I'm trying to fetch products starting with a given string, but results are all over the place..
Say I pass "coca" as a searchText then all Coca Cola products appear.. but if I just pass "coc" then I would get anything ..
wooCommerce
.getProducts(
perPage: 100,
search: this.searchText,
stockStatus: 'instock',
)
I don't see in the docs where do you decide what Product's parameter the search gets performed against and what type of search does get performed.. eg.. starts with.. contains..
Please can you point me to how to specify the parameter I want to perform the search on and how to define the type of search?
Many thanks
Cheers
I'm trying to fetch products starting with a given string, but results are all over the place..
Say I pass "coca" as a
searchTextthen all Coca Cola products appear.. but if I just pass "coc" then I would get anything ..I don't see in the docs where do you decide what Product's parameter the search gets performed against and what type of search does get performed.. eg.. starts with.. contains..
Please can you point me to how to specify the parameter I want to perform the search on and how to define the type of search?
Many thanks
Cheers