Skip to content

getProducts' search parameter unclear #72

Description

@vinnytwice

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions