WooCommerce-REST-API-Client-Library
WooCommerce-REST-API-Client-Library copied to clipboard
WooCommerce Invalid JSON returned
I am using the WooCommerce API, but i am receiving an Invalid JSON error, my page is showing:
Invalid JSON returned for http://www.domain.com/wc-api/v2/customers?oauth_consumer_key=ck_f3e235fd32a13d86e01d80d8ca75373258ef3e5a&oauth_timestamp=1447527555&oauth_nonce=711466b1dcd4e01ffb94a30c88935df3aafc7074&oauth_signature_method=HMAC-SHA256&oauth_signature=Cejru2D9vL58FF4BIr%2F%2BTALxaCvvAKnCb4lKbqliVBk%3D. 0 stdClass Object ( [headers] => Array ( [0] => Accept: application/json [1] => Content-Type: application/json [2] => User-Agent: WooCommerce API Client-PHP/2.0.1 )
[method] => GET
[url] => http://www.domain.com/wc-api/v2/customers?oauth_consumer_key=ck_f3e235fd32a13d86e01d80d8ca75373258ef3e5a&oauth_timestamp=1447527555&oauth_nonce=711466b1dcd4e01ffb94a30c88935df3aafc7074&oauth_signature_method=HMAC-SHA256&oauth_signature=Cejru2D9vL58FF4BIr%2F%2BTALxaCvvAKnCb4lKbqliVBk%3D
[params] => Array
(
[oauth_consumer_key] => ck_f3e235fd32a13d86e01d80d8ca75373258ef3e5a
[oauth_timestamp] => 1447527555
[oauth_nonce] => 711466b1dcd4e01ffb94a30c88935df3aafc7074
[oauth_signature_method] => HMAC-SHA256
[oauth_signature] => Cejru2D9vL58FF4BIr/+TALxaCvvAKnCb4lKbqliVBk=
)
[data] => Array
(
)
[body] =>
[duration] => 0.00029
) stdClass Object ( [body] => [code] => 0 [headers] => Array ( )
)
It's too bad but the guys who developed this doesn't care. All people have the same problems...and yet no solution was presented. I'm with the same problem as well and I'm trying to find the problem inside the code.
How annoying! in that case, i will have a look too, let me know if you find the solution and i will too :)
Tell me the data you are sending through the constructor.
If the domain sending data and receiving data, you'll get this JSON error...
I've also run into this error: -when $options = array( 'timeout' ); is hit, this can happen easily when you are uploading a product with a lot of variables -when the image URL you are submitting is 404 -when the PHP max_execution_time is hit on the target server
Well, when you will change your permalink settings , Plain to Post name, this error will disappear.
so change your site's permalink setting, dont use default setting