| @@ 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 | |-------------------------------------------------------------------------- |
|
| @@ 453-462 (lines=10) @@ | ||
| 450 | * Gets all taxes which will be output. |
|
| 451 | * @return array |
|
| 452 | */ |
|
| 453 | public function get_tax_totals() { |
|
| 454 | $taxes = $this->get_taxes(); |
|
| 455 | ||
| 456 | if ( apply_filters( 'woocommerce_cart_hide_zero_taxes', true ) ) { |
|
| 457 | $zero_amounts = array_filter( wp_list_pluck( $taxes, 'amount' ) ); |
|
| 458 | $taxes = array_intersect_key( $taxes, $zero_amounts ); |
|
| 459 | } |
|
| 460 | ||
| 461 | return apply_filters( 'woocommerce_cart_formatted_tax_totals', $taxes ); |
|
| 462 | } |
|
| 463 | ||
| 464 | /** |
|
| 465 | * Get tax row amounts with or without compound taxes includes. |
|