| @@ 526-537 (lines=12) @@ | ||
| 523 | * Max is left alone because the filter was already increased. |
|
| 524 | * Kicks in when prices excluding tax are displayed including tax. |
|
| 525 | */ |
|
| 526 | if ( wc_tax_enabled() && 'incl' === get_option( 'woocommerce_tax_display_shop' ) && ! wc_prices_include_tax() ) { |
|
| 527 | $tax_classes = array_merge( array( '' ), WC_Tax::get_tax_classes() ); |
|
| 528 | $class_min = $min; |
|
| 529 | ||
| 530 | foreach ( $tax_classes as $tax_class ) { |
|
| 531 | if ( $tax_rates = WC_Tax::get_rates( $tax_class ) ) { |
|
| 532 | $class_min = $min - WC_Tax::get_tax_total( WC_Tax::calc_exclusive_tax( $min, $tax_rates ) ); |
|
| 533 | } |
|
| 534 | } |
|
| 535 | ||
| 536 | $min = $class_min; |
|
| 537 | } |
|
| 538 | ||
| 539 | return array( |
|
| 540 | 'key' => '_price', |
|
| @@ 132-143 (lines=12) @@ | ||
| 129 | * Min is left alone because the product may not be taxable. |
|
| 130 | * Kicks in when prices excluding tax are displayed including tax. |
|
| 131 | */ |
|
| 132 | if ( wc_tax_enabled() && 'incl' === get_option( 'woocommerce_tax_display_shop' ) && ! wc_prices_include_tax() ) { |
|
| 133 | $tax_classes = array_merge( array( '' ), WC_Tax::get_tax_classes() ); |
|
| 134 | $class_max = $max; |
|
| 135 | ||
| 136 | foreach ( $tax_classes as $tax_class ) { |
|
| 137 | if ( $tax_rates = WC_Tax::get_rates( $tax_class ) ) { |
|
| 138 | $class_max = $max + WC_Tax::get_tax_total( WC_Tax::calc_exclusive_tax( $max, $tax_rates ) ); |
|
| 139 | } |
|
| 140 | } |
|
| 141 | ||
| 142 | $max = $class_max; |
|
| 143 | } |
|
| 144 | ||
| 145 | echo '<form method="get" action="' . esc_url( $form_action ) . '"> |
|
| 146 | <div class="price_slider_wrapper"> |
|