|
@@ 826-836 (lines=11) @@
|
| 823 |
|
|
| 824 |
|
$line_tax_data = maybe_unserialize( $item['line_tax_data'] ); |
| 825 |
|
|
| 826 |
|
if ( isset( $line_tax_data['total'] ) ) { |
| 827 |
|
|
| 828 |
|
foreach ( $line_tax_data['total'] as $tax_rate_id => $tax ) { |
| 829 |
|
|
| 830 |
|
if ( ! isset( $order_taxes[ $tax_rate_id ] ) ) { |
| 831 |
|
$order_taxes[ $tax_rate_id ] = 0; |
| 832 |
|
} |
| 833 |
|
|
| 834 |
|
$order_taxes[ $tax_rate_id ] += $tax; |
| 835 |
|
} |
| 836 |
|
} |
| 837 |
|
} |
| 838 |
|
|
| 839 |
|
foreach ( $this->get_items( array( 'shipping' ) ) as $item_id => $item ) { |
|
@@ 843-851 (lines=9) @@
|
| 840 |
|
|
| 841 |
|
$line_tax_data = maybe_unserialize( $item['taxes'] ); |
| 842 |
|
|
| 843 |
|
if ( isset( $line_tax_data ) ) { |
| 844 |
|
foreach ( $line_tax_data as $tax_rate_id => $tax ) { |
| 845 |
|
if ( ! isset( $order_shipping_taxes[ $tax_rate_id ] ) ) { |
| 846 |
|
$order_shipping_taxes[ $tax_rate_id ] = 0; |
| 847 |
|
} |
| 848 |
|
|
| 849 |
|
$order_shipping_taxes[ $tax_rate_id ] += $tax; |
| 850 |
|
} |
| 851 |
|
} |
| 852 |
|
} |
| 853 |
|
|
| 854 |
|
// Remove old existing tax rows. |