WooCommerce.NET
WooCommerce.NET copied to clipboard
Order classes missing from v3
OrderLineItem and other classes related to Order are missing from the v3 version of the Order.cs file.
This means you need to inline reference the v2 namespace while using the v3 namespace at times. Not a critical problem, but still less then ideal as it makes the code messy.
example
using WooCommerceNET.WooCommerce.v3;
...
private void DoStuffWithOrderLineItems(Order order)
{
foreach(WooCommerceNET.WooCommerce.v2.OrderLineItem orderLineItem in order.line_items)
{
....
}
}
As a workaround I do this
using WooCommerceNET.WooCommerce.v3;
using OrderLineItem = WooCommerceNET.WooCommerce.v2.OrderLineItem;
...
private void DoStuffWithOrderLineItems(Order order)
{
foreach(OrderLineItem orderLineItem in order.line_items)
{
....
}
}