| @@ 714-716 (lines=3) @@ | ||
| 711 | $this->remove_order_items( 'tax' ); | |
| 712 | ||
| 713 | // Now merge to keep tax rows | |
| 714 | 		foreach ( array_keys( $taxes + $shipping_taxes ) as $tax_rate_id ) { | |
| 715 | $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 ); | |
| 716 | } | |
| 717 | ||
| 718 | return true; | |
| 719 | } | |
| @@ 786-788 (lines=3) @@ | ||
| 783 | $this->remove_order_items( 'tax' ); | |
| 784 | ||
| 785 | // Now merge to keep tax rows. | |
| 786 | 		foreach ( array_keys( $order_taxes + $order_shipping_taxes ) as $tax_rate_id ) { | |
| 787 | $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 ); | |
| 788 | } | |
| 789 | ||
| 790 | // Save tax totals | |
| 791 | $this->set_total( WC_Tax::round( array_sum( $order_shipping_taxes ) ), 'shipping_tax' ); | |
| @@ 1614-1616 (lines=3) @@ | ||
| 1611 | $order->remove_order_items( 'tax' ); | |
| 1612 | ||
| 1613 | // Add tax rows | |
| 1614 | 		foreach ( array_keys( $taxes + $shipping_taxes ) as $tax_rate_id ) { | |
| 1615 | $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 ); | |
| 1616 | } | |
| 1617 | ||
| 1618 | // Create the new order_taxes | |
| 1619 | 		foreach ( $order->get_taxes() as $tax_id => $tax_item ) { | |