| @@ 533-542 (lines=10) @@ | ||
| 530 | * |
|
| 531 | * @return array |
|
| 532 | */ |
|
| 533 | public function get_tax_totals() { |
|
| 534 | $taxes = $this->get_items( 'tax' ); |
|
| 535 | ||
| 536 | if ( apply_filters( 'woocommerce_order_hide_zero_taxes', true ) ) { |
|
| 537 | $zero_amounts = array_filter( wp_list_pluck( $taxes, 'amount' ) ); |
|
| 538 | $taxes = array_intersect_key( $taxes, $zero_amounts ); |
|
| 539 | } |
|
| 540 | ||
| 541 | return apply_filters( 'woocommerce_order_formatted_tax_totals', $taxes ); |
|
| 542 | } |
|
| 543 | ||
| 544 | /* |
|
| 545 | |-------------------------------------------------------------------------- |
|
| @@ 441-450 (lines=10) @@ | ||
| 438 | * Gets all taxes which will be output. |
|
| 439 | * @return array |
|
| 440 | */ |
|
| 441 | public function get_tax_totals() { |
|
| 442 | $taxes = $this->get_taxes(); |
|
| 443 | ||
| 444 | if ( apply_filters( 'woocommerce_cart_hide_zero_taxes', true ) ) { |
|
| 445 | $zero_amounts = array_filter( wp_list_pluck( $taxes, 'amount' ) ); |
|
| 446 | $taxes = array_intersect_key( $taxes, $zero_amounts ); |
|
| 447 | } |
|
| 448 | ||
| 449 | return apply_filters( 'woocommerce_cart_formatted_tax_totals', $taxes ); |
|
| 450 | } |
|
| 451 | ||
| 452 | /** |
|
| 453 | * Get tax row amounts with or without compound taxes includes. |
|