|
@@ 754-764 (lines=11) @@
|
| 751 |
|
|
| 752 |
|
$line_tax_data = maybe_unserialize( $item['line_tax_data'] ); |
| 753 |
|
|
| 754 |
|
if ( isset( $line_tax_data['total'] ) ) { |
| 755 |
|
|
| 756 |
|
foreach ( $line_tax_data['total'] as $tax_rate_id => $tax ) { |
| 757 |
|
|
| 758 |
|
if ( ! isset( $order_taxes[ $tax_rate_id ] ) ) { |
| 759 |
|
$order_taxes[ $tax_rate_id ] = 0; |
| 760 |
|
} |
| 761 |
|
|
| 762 |
|
$order_taxes[ $tax_rate_id ] += $tax; |
| 763 |
|
} |
| 764 |
|
} |
| 765 |
|
} |
| 766 |
|
|
| 767 |
|
foreach ( $this->get_items( array( 'shipping' ) ) as $item_id => $item ) { |
|
@@ 771-779 (lines=9) @@
|
| 768 |
|
|
| 769 |
|
$line_tax_data = maybe_unserialize( $item['taxes'] ); |
| 770 |
|
|
| 771 |
|
if ( isset( $line_tax_data ) ) { |
| 772 |
|
foreach ( $line_tax_data as $tax_rate_id => $tax ) { |
| 773 |
|
if ( ! isset( $order_shipping_taxes[ $tax_rate_id ] ) ) { |
| 774 |
|
$order_shipping_taxes[ $tax_rate_id ] = 0; |
| 775 |
|
} |
| 776 |
|
|
| 777 |
|
$order_shipping_taxes[ $tax_rate_id ] += $tax; |
| 778 |
|
} |
| 779 |
|
} |
| 780 |
|
} |
| 781 |
|
|
| 782 |
|
// Remove old existing tax rows. |