Skip to content

Get all products that have an attribute x  #326

@bertux77

Description

@bertux77

Get all products that have an attribute x

Hi, I would like to find a way to get all the products that match an attribute marca= 226ers.
I have tried a thousand ways but none of them work. Here is an example:

$data = [
            'attributes' => [
                [
                    'id' => 3,// id of attribute Marca
                    'options' => '226Ers'
                ]
            ]
        ];
        $this->productos = $woocommerce->get('products', $data);

Any help?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions