-
Notifications
You must be signed in to change notification settings - Fork 59
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
JSON ERROR: Syntax error #55
Comments
I have changed the .htaccess file to as shown however I'm still getting JSON ERROR: Syntax error, is there a work around for this? |
I've found this error to show when trying to use the update call on a product, the root cause is the destination shop not accepting PUT requests (http 405 is thrown) as the server is limited to GET and POST requests. I'll submit a PR that will show the appropriate HTTP error. |
Hello @alexvolley and @SDekkers, Thanks for creating the issue. If you followed above configuration then it's not configuration issue. For @alexvolley you can check your API key and secret carefully and make sure have read and write permission. For further information follow this link https://woocommerce.github.io/woocommerce-rest-api-docs/#authentication For @SDekkers I think you need to check your wocommerce account that you have write access. |
@maab16 The key used was able to add products, but not update them.. I was able to reverse-engineer the response given by the API, which resulted in the below (did a
This obviously isn't JSON so the syntax error is technically correct, but the error can be better looking at the http status code. edit: I see the HTTPClient isn't part of this package, so I shall PR it into the other package. |
@SDekkers You don't need to use |
@maab16 Nothing special..
The PR I will add to the HTTPClient class in the |
@SDekkers Sounds looks good. But where you get |
Just my database, a separate modal with scraped products from a partner webshop. The issue here is that my clients webshop hasn't allowed PUT and DELETE requests on its webserver, so the error message (JSON Syntax error) was somewhat vague. |
@SDekkers Yea, you get the point. Go ahead. It's not this package related issue. |
Hey there |
I've tested and it worked for me Laravel 7 and PHP 7.4. I think your issue related to the WordPress not Laravel. If you follow the instruction carefully I hope this issue will fix. Thanks |
thanks for the response, |
Faced same issue. |
Hi, In my case the issue is related to WP installed in a subfolder. Is there a solution to apply in this case? Thanks! [Edit] |
Same problem here, new Woocommerce installation set up locally, but can't establish a connection. |
Hello @almahn, Can you share the error? Thanks |
@maab16 |
@saqlainkhadimbusiness Please share your request and response. Thanks |
Changing the store url from |
Hi, i have an implementation with woocommerce version 7.1.0 and I don't have problems. The error displaying is that: Tried with Any workaround for this? I'll try to downgrade wc version and comment later. My best regards. |
Senhores me deparei com o mesmo problema, no GET de todas as Categorias, mesma aplicação que estava rodando sem problemas dias atrás
|
Também tentei esta alternativa sem sucesso |
Hi, I use on this way and can get categories getter |
I was facing same error, i solved by this - stackoverflow |
Sometimes may be you get this error. If you are using it first time then make sure you followed some steps
mod_rewrite
in your server.htaccess
file in your WordPress root directory. Contents should look likepermalink
isPost name
The text was updated successfully, but these errors were encountered: