|
@@ 273-275 (lines=3) @@
|
| 270 |
|
$item_taxes = WC_Tax::calc_shipping_tax( $amount, WC_Tax::get_shipping_tax_rates( $cart[ $cost_key ]['data']->get_tax_class() ) ); |
| 271 |
|
|
| 272 |
|
// Sum the item taxes |
| 273 |
|
foreach ( array_keys( $taxes + $item_taxes ) as $key ) { |
| 274 |
|
$taxes[ $key ] = ( isset( $item_taxes[ $key ] ) ? $item_taxes[ $key ] : 0 ) + ( isset( $taxes[ $key ] ) ? $taxes[ $key ] : 0 ); |
| 275 |
|
} |
| 276 |
|
} |
| 277 |
|
|
| 278 |
|
// Add any cost for the order - order costs are in the key 'order' |
|
@@ 283-285 (lines=3) @@
|
| 280 |
|
$item_taxes = WC_Tax::calc_shipping_tax( $costs['order'], WC_Tax::get_shipping_tax_rates() ); |
| 281 |
|
|
| 282 |
|
// Sum the item taxes |
| 283 |
|
foreach ( array_keys( $taxes + $item_taxes ) as $key ) { |
| 284 |
|
$taxes[ $key ] = ( isset( $item_taxes[ $key ] ) ? $item_taxes[ $key ] : 0 ) + ( isset( $taxes[ $key ] ) ? $taxes[ $key ] : 0 ); |
| 285 |
|
} |
| 286 |
|
} |
| 287 |
|
} |
| 288 |
|
|