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) to language path (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 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!