Happening now | Office Hours: Customizing Your Theme With Moeed | Ask your questions now!
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

[Bug] Editing Order Line Items Changes Order Discount Amount

[Bug] Editing Order Line Items Changes Order Discount Amount

iCodeDood
Visitor
2 0 5

I process orders on creation to remove specific line items and replace them with others with the end result being that the total price of the initial order matches the order total after modifications (just with different products / line items). The totals, addition and removal of products work as expected, EXCEPT that discounts applied to the order get reduced relative to the amount of the line items that were removed from the order. If a $5,000 discount were applied to an order, for example, I wouldn't expect substituting line items with equally priced products would affect the $ discount amount applied to an order such that the discount then shows $3,000 when the discount is a $ amount applied directly to an order rather than the line item(s). This seems to be a bug more than something I'm doing incorrectly UNLESS I've missed an important point in the documentation about removing line items automatically reducing a discount amount on orders. 

For reference, the addition / removal of line items is done using GraphQL API

Replies 0 (0)