Error Getting orders
Hi, our customers use our application to get order from their websites. It uses WC.NET to get all orders that are in a processing state in the past 5 days. It works fine in all situations except one, where we are getting the following error:
Exception in WC API Wrapper GetAllOrdersParams: Expecting state 'Element'.. Encountered 'Text' with name '', namespace ''.
at ReadArrayOfOrderFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString , CollectionDataContract )
This happens each time its run from the customers site, but works fine if I run it from my PC and it extracts orders .
My first thought was that the response was being corrupted or blocked by a firewall, AV software or similar IT policy issues, but we whitelisted IPs, opened ports, disabled AV etc., all without any success.
If Postman is used to get orders in a processing state in the past 5 days it works fine from both locations.
The message doesn't give any indication of what the issue might be, so anything you can point me to would be helpful.
- Wordpress version is 5.5.1 , WooCommerce version is 4.4.1 and WooCommerce.NET version is 0.7.8
Many thanks
Mick
Hi Mick, set RestAPI.Debug to true, the json string will be included in the error message, then you can check what was wrong with the json string.
I now get Invalid URI: The Authority/Host could not be parsed.' Any ideas?