Title: Uncaught Automattic\WooCommerce\HttpClient\HttpClientException: JSON ERROR:
Last modified: January 23, 2021

---

# Uncaught Automattic\WooCommerce\HttpClient\HttpClientException: JSON ERROR:

 *  Resolved [ankur89](https://wordpress.org/support/users/ankur89/)
 * (@ankur89)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/uncaught-automatticwoocommercehttpclienthttpclientexception-json-error/)
 * Hello
    we are using woocommerce api for some purpose but this showing error on
   this link ([https://www.kiransboutique.com/api/api_single_product.php](https://www.kiransboutique.com/api/api_single_product.php))(
   Fatal error: Uncaught Automattic\WooCommerce\HttpClient\HttpClientException: 
   JSON ERROR: Syntax error in /home/509781.cloudwaysapps.com/nfkyzbddyz/public_html/
   api/vendor/automattic/woocommerce/src/WooCommerce/HttpClient/HttpClient.php:378
   Stack trace: #0 /home/509781.cloudwaysapps.com/nfkyzbddyz/public_html/api/vendor/
   automattic/woocommerce/src/WooCommerce/HttpClient/HttpClient.php(422): Automattic\
   WooCommerce\HttpClient\HttpClient->processResponse() #1 /home/509781.cloudwaysapps.
   com/nfkyzbddyz/public_html/api/vendor/automattic/woocommerce/src/WooCommerce/
   Client.php(82): Automattic\WooCommerce\HttpClient\HttpClient->request(‘products/
   88963’, ‘GET’, Array, Array) #2 /home/509781.cloudwaysapps.com/nfkyzbddyz/public_html/
   api/api_single_product.php(40): Automattic\WooCommerce\Client->get(‘products/
   88963’) #3 {main} thrown in /home/509781.cloudwaysapps.com/nfkyzbddyz/public_html/
   api/vendor/automattic/woocommerce/src/WooCommerce/HttpClient/HttpClient.php on
   line 378 ) I am follow this link for setup. [https://packagist.org/packages/automattic/woocommerce](https://packagist.org/packages/automattic/woocommerce)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-automatticwoocommercehttpclienthttpclientexception-json-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/uncaught-automatticwoocommercehttpclienthttpclientexception-json-error/#post-13971252)
 * Hi [@ankur89](https://wordpress.org/support/users/ankur89/),
 * This exception is because of “Syntax error” on JSON, so probably your website
   is throwing HTML in the response. This happens in most of the cases when PHP 
   errors are being thrown on the site, someone forgot to disable PHP’s `display_errors`.
   Still, I recommend you to read the errors in the error log of your website and
   fix these before trying to use the REST API.
 * Cheers
 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/uncaught-automatticwoocommercehttpclienthttpclientexception-json-error/#post-14003597)
 * Hi [@ankur89](https://wordpress.org/support/users/ankur89/),
 * Since we haven’t heard from you in a while, we’re hoping that means you were 
   able to get this resolved. I’m going to close this thread out now.
 * If you’re still having trouble, please open up a new topic and we’ll be happy
   to help out.
 * Take care
 *  [towoju5](https://wordpress.org/support/users/towoju5/)
 * (@towoju5)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/uncaught-automatticwoocommercehttpclienthttpclientexception-json-error/#post-14301030)
 * Please am also experiencing this issue on Localhost, please any advice as regarding
   what the cause might be?
 * Am using the PHP library here [https://packagist.org/packages/automattic/woocommerce](https://packagist.org/packages/automattic/woocommerce)
 *  [roadtrip28](https://wordpress.org/support/users/roadtrip28/)
 * (@roadtrip28)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/uncaught-automatticwoocommercehttpclienthttpclientexception-json-error/#post-14376812)
 * same problem for me.. worked weeks ago without any problems.
 *  [XuanDung38](https://wordpress.org/support/users/hxdvn/)
 * (@hxdvn)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/uncaught-automatticwoocommercehttpclienthttpclientexception-json-error/#post-14585824)
 * Solution : Just change default settings for permalink in /wp-admin/options-permalink.
   php

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Uncaught Automattic\WooCommerce\HttpClient\HttpClientException: JSON 
ERROR:’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 5 replies
 * 5 participants
 * Last reply from: [XuanDung38](https://wordpress.org/support/users/hxdvn/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/uncaught-automatticwoocommercehttpclienthttpclientexception-json-error/#post-14585824)
 * Status: resolved