Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $discount = (float) ($calc_totals - $order->get_total());
- if ( round($discount,2) > 0.00 ) {
- $line_items[] = array('type' => 7, 'price' => -$discount, 'title' => 'Discount', 'description' => 'WooCommerce Coupon Code');
- $calc_totals -= $discount;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement