| @@ 1293-1295 (lines=3) @@ | ||
| 1290 | } |
|
| 1291 | ||
| 1292 | // Tax rows - merge the totals we just got |
|
| 1293 | foreach ( array_keys( $this->taxes + $discounted_taxes ) as $key ) { |
|
| 1294 | $this->taxes[ $key ] = ( isset( $discounted_taxes[ $key ] ) ? $discounted_taxes[ $key ] : 0 ) + ( isset( $this->taxes[ $key ] ) ? $this->taxes[ $key ] : 0 ); |
|
| 1295 | } |
|
| 1296 | ||
| 1297 | /** |
|
| 1298 | * Prices exclude tax. |
|
| @@ 1319-1321 (lines=3) @@ | ||
| 1316 | $line_total = $discounted_price * $values['quantity']; |
|
| 1317 | ||
| 1318 | // Tax rows - merge the totals we just got |
|
| 1319 | foreach ( array_keys( $this->taxes + $discounted_taxes ) as $key ) { |
|
| 1320 | $this->taxes[ $key ] = ( isset( $discounted_taxes[ $key ] ) ? $discounted_taxes[ $key ] : 0 ) + ( isset( $this->taxes[ $key ] ) ? $this->taxes[ $key ] : 0 ); |
|
| 1321 | } |
|
| 1322 | } |
|
| 1323 | ||
| 1324 | // Cart contents total is based on discounted prices and is used for the final total calculation |
|
| @@ 1981-1983 (lines=3) @@ | ||
| 1978 | $this->fees[ $fee_key ]->tax_data = $fee_taxes; |
|
| 1979 | ||
| 1980 | // Tax rows - merge the totals we just got |
|
| 1981 | foreach ( array_keys( $this->taxes + $fee_taxes ) as $key ) { |
|
| 1982 | $this->taxes[ $key ] = ( isset( $fee_taxes[ $key ] ) ? $fee_taxes[ $key ] : 0 ) + ( isset( $this->taxes[ $key ] ) ? $this->taxes[ $key ] : 0 ); |
|
| 1983 | } |
|
| 1984 | } |
|
| 1985 | } |
|
| 1986 | } |
|
| @@ 338-340 (lines=3) @@ | ||
| 335 | $this->shipping_total += $rate->cost; |
|
| 336 | ||
| 337 | if ( ! empty( $rate->taxes ) && is_array( $rate->taxes ) ) { |
|
| 338 | foreach ( array_keys( $this->shipping_taxes + $rate->taxes ) as $key ) { |
|
| 339 | $this->shipping_taxes[ $key ] = ( isset( $rate->taxes[$key] ) ? $rate->taxes[$key] : 0 ) + ( isset( $this->shipping_taxes[$key] ) ? $this->shipping_taxes[$key] : 0 ); |
|
| 340 | } |
|
| 341 | } |
|
| 342 | } |
|
| 343 | } |
|