woocommerce / woocommerce/wc-api-php
PUT request stopped working
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 546
- Forks
- 158
- Avg merge
- 3h 21m
- Merged PRs (30d)
- 2
Description
PUT requests stopped working. GET requests work fine.
Receiving:
Fatal error: Uncaught Automattic\WooCommerce\HttpClient\HttpClientException: Syntax error in...
Code:
require(APP . '/lib/vendor/autoload.php');
use Automattic\WooCommerce\Client;
/*
$woocommerce = new Client(
'https://xxx.com',
'xxx',
'xxx',
[
'wp_api' => true,
'version' => 'wc/v3',
]
);
$data = [
'status' => 'Completed'
];
print_r($woocommerce->get('orders/xxx');
print_r($woocommerce->put('orders/xxx', $data));
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the PUT call through lib/vendor/autoload.php and Automattic\WooCommerce\Client, comparing it with the working GET request and capturing the full HttpClientException response. No source file or test is named; done means identifying the PUT failure cause and adding a regression test that verifies the request succeeds or reports the corrected error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100