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

Get all products that have an attribute x #326

Open
bertux77 opened this issue Apr 12, 2022 · 2 comments
Open

Get all products that have an attribute x #326

bertux77 opened this issue Apr 12, 2022 · 2 comments

Comments

@bertux77
Copy link

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

@jasie
Copy link

jasie commented May 25, 2022

I think you will have more luck getting an answer if you post this type of question on stackoverflow.com.

@Fidelity88
Copy link

Did you ever figure this out? @bertux77

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

3 participants