Please read carefully, several freelancers said they can do this and left me high and dry.
I need a php function to modify Woocommerce's built in coupon system to fix a simple issue:
Process : A woocommerce coupon is generate that has, for example 10 uses, on 10 Qualifying item with a 100% discount per item in the cart. Customer purchases 20 Items and applies coupon, which then deducts 10 Qualifying items, leaving customer to purchase the remaining 10 items. Woocommerce has no problem doing this, it works by default.
Issue: Once the customer completes the order, WooCommerce will only deduct 1 Coupon use from the system, not 10. This would allow the customer to re use that coupon again 9 more times with up-to 100 free items, 10 per order.
Current result : Coupon applies up to 10 items per cart, once cart is processed, only 1 Coupon use is reported.
Expected Result : If customer uses coupon and 8 line items qualify, after check out the coupon will be 8 uses, not 1, leaving 2 uses remaining on coupon.
* - This must be an added function in [login to view URL]
* - Must utilize coupon system built into WooCommerce
* - Coupon can be created using coupon manager, must be programmatically calculated at checkout