| @@ 733-735 (lines=3) @@ | ||
| 730 | $this->remove_order_items( 'tax' ); |
|
| 731 | ||
| 732 | // Now merge to keep tax rows |
|
| 733 | foreach ( array_keys( $taxes + $shipping_taxes ) as $tax_rate_id ) { |
|
| 734 | $this->add_tax( $tax_rate_id, isset( $taxes[ $tax_rate_id ] ) ? $taxes[ $tax_rate_id ] : 0, isset( $shipping_taxes[ $tax_rate_id ] ) ? $shipping_taxes[ $tax_rate_id ] : 0 ); |
|
| 735 | } |
|
| 736 | ||
| 737 | return true; |
|
| 738 | } |
|
| @@ 805-807 (lines=3) @@ | ||
| 802 | $this->remove_order_items( 'tax' ); |
|
| 803 | ||
| 804 | // Now merge to keep tax rows. |
|
| 805 | foreach ( array_keys( $order_taxes + $order_shipping_taxes ) as $tax_rate_id ) { |
|
| 806 | $this->add_tax( $tax_rate_id, isset( $order_taxes[ $tax_rate_id ] ) ? $order_taxes[ $tax_rate_id ] : 0, isset( $order_shipping_taxes[ $tax_rate_id ] ) ? $order_shipping_taxes[ $tax_rate_id ] : 0 ); |
|
| 807 | } |
|
| 808 | ||
| 809 | // Save tax totals |
|
| 810 | $this->set_total( WC_Tax::round( array_sum( $order_shipping_taxes ) ), 'shipping_tax' ); |
|
| @@ 1644-1646 (lines=3) @@ | ||
| 1641 | $order->remove_order_items( 'tax' ); |
|
| 1642 | ||
| 1643 | // Add tax rows |
|
| 1644 | foreach ( array_keys( $taxes + $shipping_taxes ) as $tax_rate_id ) { |
|
| 1645 | $order->add_tax( $tax_rate_id, isset( $taxes[ $tax_rate_id ] ) ? $taxes[ $tax_rate_id ] : 0, isset( $shipping_taxes[ $tax_rate_id ] ) ? $shipping_taxes[ $tax_rate_id ] : 0 ); |
|
| 1646 | } |
|
| 1647 | ||
| 1648 | // Create the new order_taxes |
|
| 1649 | foreach ( $order->get_taxes() as $tax_id => $tax_item ) { |
|