woocommerce_price_filter_results

The Advanced AJAX Product Filter for WooCommerce woocommerce price filter results hook.

Description

Parameters (3)

0. $wpdb_get_results_wpdb_prepare_select_distinct_id_post_parent_post_type_from_wpdb_posts_inner_join_wpdb_postmeta_on_id_post_id_where_post_type_in_product_product_variation_and_post_status_publish_and_meta_key_s_and_meta_value_between_d_and_d_price_min_max_object_k (unknown)
The wpdb get results wpdb prepare select distinct id post parent post type from wpdb posts inner join wpdb postmeta on id post id where post type in product product variation and post status publish and meta key s and meta value between d and d price min max object k.
1. $min (unknown)
The min.
2. $max (unknown)
The max.

Usage

To run the hook, copy the example below.
  1. $wpdb_get_results_wpdb_prepare_select_distinct_id_post_parent_post_type_from_wpdb_posts_inner_join_wpdb_postmeta_on_id_post_id_where_post_type_in_product_product_variation_and_post_status_publish_and_meta_key_s_and_meta_value_between_d_and_d_price_min_max_object_k = apply_filters( 'woocommerce_price_filter_results', $wpdb_get_results_wpdb_prepare_select_distinct_id_post_parent_post_type_from_wpdb_posts_inner_join_wpdb_postmeta_on_id_post_id_where_post_type_in_product_product_variation_and_post_status_publish_and_meta_key_s_and_meta_value_between_d_and_d_price_min_max_object_k, $min, $max ); 
  2.  
  3. if ( !empty( $wpdb_get_results_wpdb_prepare_select_distinct_id_post_parent_post_type_from_wpdb_posts_inner_join_wpdb_postmeta_on_id_post_id_where_post_type_in_product_product_variation_and_post_status_publish_and_meta_key_s_and_meta_value_between_d_and_d_price_min_max_object_k ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_price_filter_results callback 
  2. function filter_woocommerce_price_filter_results( $wpdb_get_results_wpdb_prepare_select_distinct_id_post_parent_post_type_from_wpdb_posts_inner_join_wpdb_postmeta_on_id_post_id_where_post_type_in_product_product_variation_and_post_status_publish_and_meta_key_s_and_meta_value_between_d_and_d_price_min_max_object_k, $min, $max ) { 
  3. // make filter magic happen here... 
  4. return $wpdb_get_results_wpdb_prepare_select_distinct_id_post_parent_post_type_from_wpdb_posts_inner_join_wpdb_postmeta_on_id_post_id_where_post_type_in_product_product_variation_and_post_status_publish_and_meta_key_s_and_meta_value_between_d_and_d_price_min_max_object_k
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_price_filter_results', 'filter_woocommerce_price_filter_results', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_price_filter_results', 'filter_woocommerce_price_filter_results', 10, 3 ); 

Defined (1)

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

/woocommerce-filters.php  
  1. $matched_products_query = apply_filters( 'woocommerce_price_filter_results', $wpdb->get_results( $wpdb->prepare("