woocommerce_price_filter_widget_tax_class

woocommerce_price_filter_widget_tax_class

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_price_filter_widget_tax_class') is found 2 times:

  • /includes/class-wc-query.php line 688
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    * Adjust if the store taxes are not displayed how they are stored.
     * Kicks in when prices excluding tax are displayed including tax.
     */
    if ( wc_tax_enabled() && 'incl' === get_option( 'woocommerce_tax_display_shop' ) && ! wc_prices_include_tax() ) {
        $tax_class = apply_filters( 'woocommerce_price_filter_widget_tax_class', '' ); // Uses standard tax class.
        $tax_rates = WC_Tax::get_rates( $tax_class );
     
        if ( $tax_rates ) {
            $current_min_price -= WC_Tax::get_tax_total( WC_Tax::calc_inclusive_tax( $current_min_price, $tax_rates ) );
            $current_max_price -= WC_Tax::get_tax_total( WC_Tax::calc_inclusive_tax( $current_max_price, $tax_rates ) );
        }
  • /includes/widgets/class-wc-widget-price-filter.php line 98
    094
    095
    096
    097
    098
    099
    100
    101
    102
    103
    104
    // Check to see if we should add taxes to the prices if store are excl tax but display incl.
    $tax_display_mode = get_option( 'woocommerce_tax_display_shop' );
     
    if ( wc_tax_enabled() && ! wc_prices_include_tax() && 'incl' === $tax_display_mode ) {
        $tax_class = apply_filters( 'woocommerce_price_filter_widget_tax_class', '' ); // Uses standard tax class.
        $tax_rates = WC_Tax::get_rates( $tax_class );
     
        if ( $tax_rates ) {
            $min_price += WC_Tax::get_tax_total( WC_Tax::calc_exclusive_tax( $min_price, $tax_rates ) );
            $max_price += WC_Tax::get_tax_total( WC_Tax::calc_exclusive_tax( $max_price, $tax_rates ) );
        }