linkedin

Frequently Asked Questions

⌘K
  1. Home
  2. /
  3. Docs
  4. /
  5. Frequently Asked Question...
  6. /
  7. Errors
  8. /
  9. Why do I get a network er...

Why do I get a network error when submitting an order?

If you are able to connect to your store, but receive a network error when submitting an order, there might be a server configuration preventing the request from being sent or possibly some other error that occurred in your WordPress back-end.

To check whether there was a WordPress error causing the connection to fail, you can open your WordPress admin dashboard and navigate to WooCommerce -> Status -> Logs and view the latest fatal error log by selecting it from the dropdown. Here you should be able to see if there are any errors related to FooSales or possibly a conflict with another plugin. If there are no errors or nothing that seems related to FooSales, then there might be a server configuration preventing the request from being sent.

FooSales connects to your store from a domain that is different from your domain (https://web.foosales.com). Requests between different domains are known as cross-origin resource sharing requests (CORS). Your server will need to specifically allow these types of requests. Normally servers are already setup to accept these requests and return the response with the appropriate headers, but some servers might be configured to block them. Your browser will prevent the request from completing if the response does not have the required headers.

Your server needs to return an Access-Control-Allow-Origin header that allows FooSales to post data to your store. You should be able to see whether or not this header is enabled and what its value is if you have access to your server configuration. You can also contact your server admin or web host to ask about allowing cross-domain REST API requests for FooSales. Some browsers also have settings that you can tweak to allow these requests for FooSales. Alternatively, you can use a proxy server that ensures that all the correct headers are set and returned between your website and FooSales.

Tags , , , , , , , , , , , ,