WooCommerce-REST-API-Client-Library icon indicating copy to clipboard operation
WooCommerce-REST-API-Client-Library copied to clipboard

Invalid JSON

Open alanlaithwaite opened this issue 7 years ago • 0 comments

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

alanlaithwaite avatar Apr 12 '18 10:04 alanlaithwaite