-
-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product DateTime Deserialization Issue #462
Comments
Have you checked this #445 ? |
I think it has something to do with your server Calendar setting, but I don't know what changes you have done that cause this issue. |
Yes. For now I moved ahead by using workaround - string trimstr(string json) |
I see, that's a invalid date string, your solution should work fine. |
Yes. It did. Thanks for your help. |
Make sure you have included the below details when open an issue. Thank you.
Wordpress version, WooCommerce version and WooCommerce.NET version
Wordpress version : 5.4
WooCommerce version : 4.0.1
WooCommerce.NET : 0.8.2 and 0.7.9
Steps to replicate the issue
I hate synced the products already. Now to update the changes on WooCommerce when trying to get the product then getting deserialization issue.
Code :
Task productTask = Task.Run(() => wc.Product.Get(item.WooCommerceId));
productTask.Wait();
var product = productTask.Result;
Details of the error message if there is any
There was an error deserializing the object of type WooCommerceNET.WooCommerce.v3.Product. The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.
at WooCommerceNET.RestAPI.DeserializeJSon[T](String jsonString)
at WooCommerceNET.Base.WCItem`1.d__9.MoveNext()
Due to this my live website is down. Please help me to get this resolved.
The text was updated successfully, but these errors were encountered: