Home Forums Basel support forum Filters not working correctly on attribute archives Reply To: Filters not working correctly on attribute archives

#27784

mihael
Participant

I see that his is “being forced” in woocommerce.php line 1384?

/**
 * ------------------------------------------------------------------------------------------------
 * Force BASEL Swatche layered nav and price widget to work
 * ------------------------------------------------------------------------------------------------
 */

//add_filter( 'woocommerce_is_layered_nav_active', '__return_true' );
add_filter( 'woocommerce_is_layered_nav_active', 'basel_is_layered_nav_active' );
if( ! function_exists( 'basel_is_layered_nav_active' ) ) {
	function basel_is_layered_nav_active() {
		return is_active_widget( false, false, 'basel-woocommerce-layered-nav', true );
	}
}

add_filter( 'woocommerce_is_price_filter_active', 'basel_is_layered_price_active' );

if( ! function_exists( 'basel_is_layered_price_active' ) ) {
	function basel_is_layered_price_active() {
		$result = is_active_widget( false, false, 'basel-price-filter', true );
		if( ! $result ) {
			$result = apply_filters( 'basel_use_custom_price_widget', true );
		}
		return $result;
	}
}