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

WooCommerce Invalid JSON returned

Open charliejsford opened this issue 9 years ago • 6 comments

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 ( )

)

charliejsford avatar Nov 14 '15 19:11 charliejsford

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.

PINHOf avatar Dec 23 '15 12:12 PINHOf

How annoying! in that case, i will have a look too, let me know if you find the solution and i will too :)

charliejsford avatar Dec 23 '15 15:12 charliejsford

Tell me the data you are sending through the constructor.

PINHOf avatar Dec 23 '15 16:12 PINHOf

If the domain sending data and receiving data, you'll get this JSON error...

OrganicChem avatar Jan 23 '16 03:01 OrganicChem

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

waters01 avatar Jan 27 '16 03:01 waters01

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

azizchouhan avatar Aug 31 '16 11:08 azizchouhan