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