|
@@ 308-310 (lines=3) @@
|
| 305 |
|
$item_taxes = WC_Tax::calc_shipping_tax( $amount, WC_Tax::get_shipping_tax_rates( $cart[ $cost_key ]['data']->get_tax_class() ) ); |
| 306 |
|
|
| 307 |
|
// Sum the item taxes |
| 308 |
|
foreach ( array_keys( $taxes + $item_taxes ) as $key ) { |
| 309 |
|
$taxes[ $key ] = ( isset( $item_taxes[ $key ] ) ? $item_taxes[ $key ] : 0 ) + ( isset( $taxes[ $key ] ) ? $taxes[ $key ] : 0 ); |
| 310 |
|
} |
| 311 |
|
} |
| 312 |
|
|
| 313 |
|
// Add any cost for the order - order costs are in the key 'order' |
|
@@ 318-320 (lines=3) @@
|
| 315 |
|
$item_taxes = WC_Tax::calc_shipping_tax( $costs['order'], WC_Tax::get_shipping_tax_rates() ); |
| 316 |
|
|
| 317 |
|
// Sum the item taxes |
| 318 |
|
foreach ( array_keys( $taxes + $item_taxes ) as $key ) { |
| 319 |
|
$taxes[ $key ] = ( isset( $item_taxes[ $key ] ) ? $item_taxes[ $key ] : 0 ) + ( isset( $taxes[ $key ] ) ? $taxes[ $key ] : 0 ); |
| 320 |
|
} |
| 321 |
|
} |
| 322 |
|
} |
| 323 |
|
|