Anytime I specify an id when adding a Variation Attribute (or anything really), nothing gets added. If I use 0 or omit the id, It gets added.
The code below doesn't work (no error message, just doesn't add the Variation Attribute).
Variation newVariation = variant;
newVariation.attributes = new List<VariationAttribute>()
{
new VariationAttribute()
{
id=99, // THIS DOES NOT WORK
name="Options",
option= Variants[count]
}
};
var upVar = wc.Product.Variations.Update((ulong)variant.id, newVariation, Convert.ToUInt32(RecID));
The next section code adds works but there's no id or it's 0. Anything else and it never get's added.
Variation newVariation = variant;
newVariation.attributes = new List<VariationAttribute>()
{
new VariationAttribute()
{
name="Options",
option= Variants[count]
}
};
var upVar = wc.Product.Variations.Update((ulong)variant.id, newVariation, Convert.ToUInt32(RecID));
Originally posted by @XiaoFaye in https://github.com/XiaoFaye/WooCommerce.NET/issues/436#issuecomment-596412473
Anytime I specify an id when adding a Variation Attribute (or anything really), nothing gets added. If I use 0 or omit the id, It gets added. The code below doesn't work (no error message, just doesn't add the Variation Attribute).
The next section code adds works but there's no id or it's 0. Anything else and it never get's added.