You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bug fixes
Fix POS store-credit balance deductions when WCPOS sends signed or zero-value coupon line discounts to StoreApps Smart Coupons.
Normalize POS smart-coupon usage to positive StoreApps smart_coupons_contribution values so coupon balances decrease instead of staying unchanged or increasing.
Infer zero-value POS coupon line usage from order-level discounts or reduced order totals only when the store-credit allocation is unambiguous.
Avoid over-deducting ambiguous mixed-coupon orders and POS orders with negative fee/manager discount lines.
Tests
Expanded regression coverage for real StoreApps balance updates.
Added coverage for positive, negative, and zero POS coupon discounts.
Added coverage for mixed regular coupons, zero-amount non-store coupons, tax mode differences, ambiguous multi-coupon cases, and negative POS fees.