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

getProducts' search parameter unclear #72

Open
vinnytwice opened this issue Jun 27, 2022 · 0 comments
Open

getProducts' search parameter unclear #72

vinnytwice opened this issue Jun 27, 2022 · 0 comments

Comments

@vinnytwice
Copy link

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

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

1 participant