woocommerce / woocommerce/wc-api-php

Get all products that have an attribute x

Open
#326 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
PHP
Stars
546
Forks
158
Avg merge
3h 21m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WooCommerce REST API products endpoint and review the request parameters for filtering products by an attribute. The issue provides no repository file or test to inspect; work would be complete only when a supported way to retrieve products matching the requested attribute is identified or specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.