dc-woocommerce-multi-vendor icon indicating copy to clipboard operation
dc-woocommerce-multi-vendor copied to clipboard

Saving coupon line incorrectly in suborders

Open victormattosvm opened this issue 2 years ago • 0 comments

  1. An order is placed using a coupon (eg -10%)
  2. WCMp generates suborder A ($30 off) and suborder B ($50 off)
  3. 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.

victormattosvm avatar Aug 26 '22 02:08 victormattosvm