is_filtered

Is_filtered - Returns true when filtering products using layered nav or price sliders.

Description

is_filtered(); 

Usage

  1. if ( !function_exists( 'is_filtered' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-conditional-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = is_filtered(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-conditional-functions.php  
  1. function is_filtered() { 
  2. return apply_filters( 'woocommerce_is_filtered', ( sizeof( WC_Query::get_layered_nav_chosen_attributes() ) > 0 || isset( $_GET['max_price'] ) || isset( $_GET['min_price'] ) || isset( $_GET['rating_filter'] ) ) );