| @@ 720-722 (lines=3) @@ | ||
| 717 | $this->remove_order_items( 'tax' ); |
|
| 718 | ||
| 719 | // Now merge to keep tax rows |
|
| 720 | foreach ( array_keys( $taxes + $shipping_taxes ) as $tax_rate_id ) { |
|
| 721 | $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 ); |
|
| 722 | } |
|
| 723 | ||
| 724 | return true; |
|
| 725 | } |
|
| @@ 792-794 (lines=3) @@ | ||
| 789 | $this->remove_order_items( 'tax' ); |
|
| 790 | ||
| 791 | // Now merge to keep tax rows. |
|
| 792 | foreach ( array_keys( $order_taxes + $order_shipping_taxes ) as $tax_rate_id ) { |
|
| 793 | $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 ); |
|
| 794 | } |
|
| 795 | ||
| 796 | // Save tax totals |
|
| 797 | $this->set_total( WC_Tax::round( array_sum( $order_shipping_taxes ) ), 'shipping_tax' ); |
|
| @@ 1617-1619 (lines=3) @@ | ||
| 1614 | $order->remove_order_items( 'tax' ); |
|
| 1615 | ||
| 1616 | // Add tax rows |
|
| 1617 | foreach ( array_keys( $taxes + $shipping_taxes ) as $tax_rate_id ) { |
|
| 1618 | $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 ); |
|
| 1619 | } |
|
| 1620 | ||
| 1621 | // Create the new order_taxes |
|
| 1622 | foreach ( $order->get_taxes() as $tax_id => $tax_item ) { |
|