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

Invalid JSON #246

Open
alanlaithwaite opened this issue Apr 12, 2018 · 0 comments
Open

Invalid JSON #246

alanlaithwaite opened this issue Apr 12, 2018 · 0 comments

Comments

@alanlaithwaite
Copy link

alanlaithwaite commented Apr 12, 2018

Hi, I have just started to use your libary and everything works fine with read, read individual item, create a new product, but when I try to update a product with ID I get the following error.
Hope someone can help. We are using your examples script.
print_r($client->products->update(349,array( 'title' => 'Yet another test product')));

( ! ) Fatal error: Uncaught WC_API_Client_HTTP_Exception: Invalid JSON returned for http:///wc-api/v2/products/349?oauth_consumer_key=&oauth_timestamp=1523529816&oauth_nonce=0f2bf*****************************&oauth_signature_method=HMAC-SHA256&oauth_signature=IKl5QXahft1xevYus7ZhDGusUOx%2BnEnpdZfPxy7QS34%3D. in D:\workspace\vs2013\smty_wcapi\lib\woocommerce-api\class-wc-api-client-http-request.php on line 182

1 | 0.0142 | 385864 | {main}( ) | ...\example.php:0
2 | 10.9010 | 871160 | WC_API_Client_Resource_Products->update( ) | ...\example.php:126
3 | 10.9011 | 870784 | WC_API_Client_Resource_Products->do_request( ) | ...\class-wc-api-client-resource-products.php:107
4 | 10.9013 | 870824 | WC_API_Client->make_api_call( ) | ...\abstract-wc-api-client-resource.php:122
5 | 10.9040 | 875448 | WC_API_Client_HTTP_Request->dispatch( ) | ...\class-wc-api-client.php:286

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

1 participant