dc-woocommerce-multi-vendor
dc-woocommerce-multi-vendor copied to clipboard
Saving coupon line incorrectly in suborders
- An order is placed using a coupon (eg -10%)
- WCMp generates suborder A ($30 off) and suborder B ($50 off)
- When creating the suborders, WCMp is saving the total discount amount ($80 - located in WC_Cart) on both suborders as line item. Check items and itemmeta tables, please.
The correct behavior is to save each seller's (suborder) discount individually ($30 and $50).
https://github.com/multivendorx/dc-woocommerce-multi-vendor/blob/c188dccd33cab046385eac9c9a3de934b115f1a3/classes/class-wcmp-order.php#L756
I'll try to fix it and I open a PR.