WooCommerce Apply Coupon to order AFTER taxes
I’ve recently came across this problem as well and managed to fix it. In my case I created the order and added the line items and coupons programatically. When this is done, you calculate the totals and taxes. If there was no coupon to apply I would use: $order->calculate_totals( true ) and when a coupon … Read more