Overview
Various troubleshooting tips for WooCommerce.
Error: Unsuccessful - The remote server returned an error: (400) Bad Request.
If you save or test the connection and get this error, you may need to enable permalinks. To do this:
- In your WooCommerce account, select Settings, then select Permalinks.
- Under Common Settings, select Post name.
- Click Save changes.
- In your account, go to Settings, then select Platforms.
- Next to WooCommerce, select Settings.
- Scroll down and click Test to ensure it works.
You should get a successful result.
Error: Unsuccessful - woocommerce_api_authentication_error: Consumer key is missing.
If you save or test the connection and get this error, you may need use the consumer key and secret as query string parameters. To do this:
- Log into DHL Express Commerce
- Go to Settings, then select Integrations
- Click Settings next to your WooCommerce integration
- Select Use consumer key and secret as query string parameters
- Click Save
Error when integrating with WooCommerce or importing orders
If you get an Unsuccessful 404 error when trying to import orders or integrating, you may need to check your store URL.
- Check your domain URL with 'http://'.
- If your browser gets redirected to 'https://', test your integration with your consumer key and secret eg https://www.YOURSTORE.com/wc-api/v3/orders?consumer_key=XXXXXXX&consumer_secret=XXXXXXX
- If you can see a list of orders, go back to the WooCommerce settings in DHL Express Commerce Settings > Integrations> WooCommerce.
- In the URL field, change your URL to start with 'https://'.
- Test to ensure the connection works. You should get a successful result. If you continue to receive an error, please contact our support team
- If you get a successful result with the above test but the connection in DEC is stating unsuccessful please disable "Bot Fight Mode" with your CloudFlare in WooCommerce.
Error with WooCommerce writeback: The remote server returned an error: (405) Method Not Allowed
This may first appear as an issue when customers receive multiple order confirmation emails. Checking the Writeback log for a Printed order will confirm this.
When the Writeback Fails and the log contains the error: The remote server returned an error: (405) Method Not Allowed. Try the following:
- Log into DHL Express Commerce
- Go to Settings, then select Integrations
- Click Settings next to your WooCommerce integration
- Set Order Update Method to PUT
- Save.
- Navigate to Orders > Printed tab > Right Click on an Order > Update Selected Orders in Source System
- The writeback should retrigger for the selected orders.
Error: Unsuccessful - The underlying connection was closed: The connection was closed unexpectedly.
If you test the connection and get this error, add the following content into the Custom Request Headers field:
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36
Error: Writeback failing with 401 error
This means that we do not have the proper authentication to update your orders. Try ticking the "Use consumer key and secret as query string parameters" option. This usually bypasses many of the security/firewall issues a server may be having with processing the authorisation
Error: Writeback failing with 403 error
This means we do not have the proper permissions to update your orders in your store. Make sure the API key has both read and write permissions.
Also ensure that the user you have assigned is a stand alone user with admin permissions.