|
@@ 847-857 (lines=11) @@
|
| 844 |
|
|
| 845 |
|
$line_tax_data = maybe_unserialize( $item['line_tax_data'] ); |
| 846 |
|
|
| 847 |
|
if ( isset( $line_tax_data['total'] ) ) { |
| 848 |
|
|
| 849 |
|
foreach ( $line_tax_data['total'] as $tax_rate_id => $tax ) { |
| 850 |
|
|
| 851 |
|
if ( ! isset( $order_taxes[ $tax_rate_id ] ) ) { |
| 852 |
|
$order_taxes[ $tax_rate_id ] = 0; |
| 853 |
|
} |
| 854 |
|
|
| 855 |
|
$order_taxes[ $tax_rate_id ] += $tax; |
| 856 |
|
} |
| 857 |
|
} |
| 858 |
|
} |
| 859 |
|
|
| 860 |
|
foreach ( $this->get_items( array( 'shipping' ) ) as $item_id => $item ) { |
|
@@ 864-872 (lines=9) @@
|
| 861 |
|
|
| 862 |
|
$line_tax_data = maybe_unserialize( $item['taxes'] ); |
| 863 |
|
|
| 864 |
|
if ( isset( $line_tax_data ) ) { |
| 865 |
|
foreach ( $line_tax_data as $tax_rate_id => $tax ) { |
| 866 |
|
if ( ! isset( $order_shipping_taxes[ $tax_rate_id ] ) ) { |
| 867 |
|
$order_shipping_taxes[ $tax_rate_id ] = 0; |
| 868 |
|
} |
| 869 |
|
|
| 870 |
|
$order_shipping_taxes[ $tax_rate_id ] += $tax; |
| 871 |
|
} |
| 872 |
|
} |
| 873 |
|
} |
| 874 |
|
|
| 875 |
|
// Remove old existing tax rows. |