| @@ 1616-1618 (lines=3) @@ | ||
| 1613 | $order->remove_order_items( 'tax' );  | 
                                |
| 1614 | ||
| 1615 | // Add tax rows  | 
                                |
| 1616 | 		foreach ( array_keys( $taxes + $shipping_taxes ) as $tax_rate_id ) { | 
                                |
| 1617 | $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 );  | 
                                |
| 1618 | }  | 
                                |
| 1619 | ||
| 1620 | // Create the new order_taxes  | 
                                |
| 1621 | 		foreach ( $order->get_taxes() as $tax_id => $tax_item ) { | 
                                |
| @@ 768-770 (lines=3) @@ | ||
| 765 | $this->remove_order_items( 'tax' );  | 
                                |
| 766 | ||
| 767 | // Now merge to keep tax rows  | 
                                |
| 768 | 		foreach ( array_keys( $taxes + $shipping_taxes ) as $tax_rate_id ) { | 
                                |
| 769 | $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 );  | 
                                |
| 770 | }  | 
                                |
| 771 | ||
| 772 | return true;  | 
                                |
| 773 | }  | 
                                |
| @@ 840-842 (lines=3) @@ | ||
| 837 | $this->remove_order_items( 'tax' );  | 
                                |
| 838 | ||
| 839 | // Now merge to keep tax rows.  | 
                                |
| 840 | 		foreach ( array_keys( $order_taxes + $order_shipping_taxes ) as $tax_rate_id ) { | 
                                |
| 841 | $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 );  | 
                                |
| 842 | }  | 
                                |
| 843 | ||
| 844 | // Save tax totals  | 
                                |
| 845 | $this->set_total( WC_Tax::round( array_sum( $order_shipping_taxes ) ), 'shipping_tax' );  | 
                                |