woocommerce / woocommerce/wc-api-php

can't filter by attributes

Open
#303 2 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

Hi I've tried for hours to get a simple filtered result with php Client
$params = [ 'filter[pa_writer]' => 'stephen king' ]; $response = $this->client->get('products', $params);

can you give me a little example of a request filtered by attribute or other fields.
in the woocommerce-rest-api-docs i've found this table
image
but nothing work in the client only the example of listing All products.
thank you
have an epic day! =D

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 PHP client call shown in the issue and the WooCommerce REST API documentation table. Reproduce the filtered products request and check whether the client passes the filter parameters through as documented. Done means providing a verified example for filtering by an attribute or other product field, or clearly documenting the limitation if it does not work.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.