Skip to main content
New Member
March 9, 2021
Solved

WooCommerce error message: "Unable to access the orders API, please check connection settings and try again."

  • March 9, 2021
  • 14 replies
  • 2051 views

Hi! I’m getting this error when i try to Connect to WooCommerce from Klaviyo Integrations:

Unable to access the orders API, please check connection settings and try again.

 

If I generate a new pair of keys and select Legacy API, it connects, but I want to use the new API so it can sync periodically. The site is behind Cloudflare. I tried to set a firewall rule to allow Klaviyo user agent but no luck.

I would like to know what may be causing this.

 

Thank you,

    This topic has been closed for replies.
    Best answer by Diyafury

    Hi guys

     

    I had the same issue… the credentials worked with the legacy api and not the current rest api…

    Basically I discovered that If there’s an error with the orders response, then you won’t be able to connect… this happened in my case.

     

    I tested the woocommerce orders request url with my consumer key and secret with the Postman app and noticed that there was an error in my code (a missing null check)… a very simple fix and now I can connect woocommerce with Klaviyo.

     

    To test in postman… please see here: https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API

    14 replies

    Taylor Tarpley
    Community Manager
    Community Manager
    December 2, 2021

    Hi @subtainishfaq

     

    Sorry to hear you’re experiencing these issues as well!

     

    Can you confirm that you have worked through the possible options I listed above and your integration is an updated version of Woocommerce: Version 3.5x or later and WP Version 4.4 or later? If you thoroughly checked these steps and met the requirements, I would recommend reaching out to our Support Team as they will be able to further investigate why you might be encountering this error! 

     

    Thanks for sharing your experience in the Community!

    -Taylor 

    Contributor I
    April 13, 2022

    Hi guys

     

    I had the same issue… the credentials worked with the legacy api and not the current rest api…

    Basically I discovered that If there’s an error with the orders response, then you won’t be able to connect… this happened in my case.

     

    I tested the woocommerce orders request url with my consumer key and secret with the Postman app and noticed that there was an error in my code (a missing null check)… a very simple fix and now I can connect woocommerce with Klaviyo.

     

    To test in postman… please see here: https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API

    Hi Diyafury, how did you fix the “Missing null check”? I’m currently in this error and I don’t have any idea how to do it.

    Contributor I
    April 13, 2022

    Hi guys

     

    I had the same issue… the credentials worked with the legacy api and not the current rest api…

    Basically I discovered that If there’s an error with the orders response, then you won’t be able to connect… this happened in my case.

     

    I tested the woocommerce orders request url with my consumer key and secret with the Postman app and noticed that there was an error in my code (a missing null check)… a very simple fix and now I can connect woocommerce with Klaviyo.

     

    To test in postman… please see here: https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API

    Hi Diyafury, how did you fix the “Missing null check”? I’m currently in this error and I don’t have any idea how to do it.

    @Diyafury 

    Taylor Tarpley
    Community Manager
    Community Manager
    April 15, 2022

    Hi @razzorax

     

    It seems like diyafury combined through her code and found the error herself. However, if you’re still experiencing this issue, I’d reach out to our awesome Support Team as they might be able to find the source of the exact error! 

     

    Thanks for participating in the Community!

    -Taylor