Title: JSON Error: Syntax error
Last modified: June 24, 2022

---

# JSON Error: Syntax error

 *  Resolved [montebianco](https://wordpress.org/support/users/montebianco/)
 * (@montebianco)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-error-syntax-error/)
 * The plugin worked great for awhile , now when trying batch push and individual
   product syncing There is a popup JSON error message saying Syntax error.
    Also,
   the automatic sync is not working in the background when stock changed on main
   site. Orders on the secondary site are updating stock on the main site. Console
   does not provide any extra info for the error.

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

 *  Plugin Author [WP Trio](https://wordpress.org/support/users/wooelements/)
 * (@wooelements)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-error-syntax-error/#post-15766584)
 * Hi,
 * Syntax error occurs when the other website responds in a non-standard way that
   cannot be handled correctly. There are a few common reasons why it happens:
    - URL is invalid / doesn’t respond – **try to visit with your browser and ensure
      it displays the URL correctly**
    - Some security / firewall plugin causes the error, such as Defender – **disable
      security plugins temporarily and test again**
    - Another plugin is causing a conflict which results in an error – **check PHP
      and WordPress error / debug logs**
    - SSL certificate is invalid – **try with valid SSL certificate or disable SSL
      temporarily**
    - HTTP basic authentication is enabled which prevents connection – **disable
      any HTTP basic auth**
    - Multilingual plugin such as WPML or Polylang is redirecting from base path(
      [https://example.com](https://example.com)) to language path ([https://example.com/en](https://example.com/en))–**
      try to add language code (e.g. /en) to the URL**
 * When you run the credential check in the settings (_WooCommerce > Settings > 
   Stock Sync > Check credentials_) and syntax error occurs, the plugin will log
   the URL, response code and body which sometimes can give hint about the issue.
   You can view the log in _WooCommerce > Status > Logs > woo-stock-sync-exception-
   x-x-x-xxxxx.log_. The log is different from the basic log (_WooCommerce > Stock
   Sync > Log_). In [this example](https://wooelements.com/wp-content/uploads/2020/02/stock-sync-pro-404-error-2.png)
   the reason is 404 error which means that the page couldn’t be found.
 * If you run the credential check and send contents of the exception log, I can
   check what could be the issue. Thank you!
 *  Thread Starter [montebianco](https://wordpress.org/support/users/montebianco/)
 * (@montebianco)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/json-error-syntax-error/#post-15803026)
 * Hi,
    Thanks for the pointers. The problem we found was that a new security plugin
   locked out the hosting server’s IP address “Reason: Multiple erroneous requests”
   and “Probing for vulnerable code”. The server IP was whitelisted and it is working
   again.
 *  Plugin Author [WP Trio](https://wordpress.org/support/users/wooelements/)
 * (@wooelements)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/json-error-syntax-error/#post-15804258)
 * Glad to hear you found the culprit and thanks for reporting back!

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

The topic ‘JSON Error: Syntax error’ is closed to new replies.

 * ![](https://ps.w.org/stock-sync-for-woocommerce/assets/icon-128x128.png?rev=2019526)
 * [Stock Sync for WooCommerce](https://wordpress.org/plugins/stock-sync-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/stock-sync-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/stock-sync-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stock-sync-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stock-sync-for-woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [WP Trio](https://wordpress.org/support/users/wooelements/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/json-error-syntax-error/#post-15804258)
 * Status: resolved