woocommerce / woocommerce/wc-api-php

Put, Get and Delete return types

Open
#288 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

The client library states the return types for the PUT, GET and DELETE methods should be array.
The actual type returned is stdClass (with some exceptions).

Example,

$result = $client->put('orders/<id>', Array('status' => 'completed'));
var_dump($result);

object(stdClass)

Package

"name": "automattic/woocommerce",
"version": "3.0.0"

WooCommerce 4.6.0
Wordpress 5.5.1

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 by inspecting the client library implementations and documentation for the PUT, GET, and DELETE methods, then compare their declared return types with the reported stdClass result and noted exceptions. Done means the documented or implemented return types consistently match the actual behavior, with the relevant cases covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.