Skip to content

The stock_status parameter does not work #22

@bertux77

Description

@bertux77

I'm trying to get all the products in a category that have stock_status=instock but that parameter doesn't work.
The same api consumed from PHP does work, so something in flutter is wrong. I've tried all the ways but I can't get it to work.
Any help?

Future getProduct(int idCategory) async {
    WooCommerceAPI wooCommerceAPI = WooCommerceAPI(
        url: "xxx/",
        consumerKey: "xxx",
        consumerSecret: "xxx");

    var productos = await wooCommerceAPI
        .getAsync("products?stock_status='instock'&per_page=100");
    
    return productos;
  }

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