Advanced AJAX Product Filters - Version 1.4.1.4

Version Description

  • Fix - Correct count for attribute values with some WooCommerce Shortcodes
  • Fix - Option text not correct
  • Fix - Some variable products not excluded with disabled Additional table add-on
Download this release

Release Info

Developer RazyRx
Plugin Icon wp plugin Advanced AJAX Product Filters
Version 1.4.1.4
Comparing to
See all releases

Code changes from version 1.4.1.3 to 1.4.1.4

includes/addons/woocommerce-variation.php CHANGED
@@ -152,7 +152,7 @@ class BeRocket_AAPF_compat_woocommerce_variation {
152
  'join_close_1' => ') as max_filtered_post ON max_filtered_post.ID = filtered_post.ID AND max_filtered_post.max_meta_count = filtered_post.meta_count',
153
  'join_open_2' => 'LEFT JOIN (',
154
  'subquery_3' => array(
155
- 'select' => 'SELECT %1$s .id as id, COALESCE(stock_table_init.out_of_stock_init1, "0") as out_of_stock_init',
156
  'from' => 'FROM %1$s',
157
  'join_open' => 'LEFT JOIN (',
158
  'subquery' => array(
152
  'join_close_1' => ') as max_filtered_post ON max_filtered_post.ID = filtered_post.ID AND max_filtered_post.max_meta_count = filtered_post.meta_count',
153
  'join_open_2' => 'LEFT JOIN (',
154
  'subquery_3' => array(
155
+ 'select' => 'SELECT %1$s .id as id, IF(%1$s.post_status = "private", 1, COALESCE(stock_table_init.out_of_stock_init1, "0")) as out_of_stock_init',
156
  'from' => 'FROM %1$s',
157
  'join_open' => 'LEFT JOIN (',
158
  'subquery' => array(
includes/filters/display_widget.php CHANGED
@@ -411,7 +411,8 @@ class BeRocket_AAPF_Widget extends WP_Widget {
411
  'hide_empty' => true
412
  );
413
  $get_terms_advanced = array(
414
- 'operator' => $operator
 
415
  );
416
  if( ! empty($cat_value_limit) ) {
417
  $get_terms_advanced['additional_tax_query'] = array(
411
  'hide_empty' => true
412
  );
413
  $get_terms_advanced = array(
414
+ 'operator' => $operator,
415
+ 'force_query' => ! empty($br_wp_footer)
416
  );
417
  if( ! empty($cat_value_limit) ) {
418
  $get_terms_advanced['additional_tax_query'] = array(
includes/filters/get_terms.php CHANGED
@@ -151,7 +151,7 @@ class BeRocket_AAPF_get_terms {
151
  if( ! isset(self::$prepared_data['wc_query_data']) ) {
152
  self::$prepared_data['wc_query_data'] = array();
153
  }
154
- if( ! isset(self::$prepared_data['wc_query_data']['post__in']) || ! isset(self::$prepared_data['wc_query_data']['post__not_in']) ) {
155
  global $wp_query, $br_wc_query, $br_aapf_wc_footer_widget;
156
 
157
  $post__in = ( isset($wp_query->query_vars['post__in']) ? $wp_query->query_vars['post__in'] : array() );
@@ -177,7 +177,6 @@ class BeRocket_AAPF_get_terms {
177
  }
178
  self::$prepared_data['wc_query_data']['post__in'] = apply_filters('berocket_aapf_get_attribute_values_post__in_outside', $post__in);
179
  self::$prepared_data['wc_query_data']['post__not_in'] = apply_filters('berocket_aapf_get_attribute_values_post__not_in_outside', $post__not_in);
180
- remove_filter('berocket_aapf_get_terms_filter_after', array(__CLASS__, 'prepared_data'), 1, 3);
181
  }
182
  return $terms;
183
  }
151
  if( ! isset(self::$prepared_data['wc_query_data']) ) {
152
  self::$prepared_data['wc_query_data'] = array();
153
  }
154
+ if( $additional['force_query'] || ! isset(self::$prepared_data['wc_query_data']['post__in']) || ! isset(self::$prepared_data['wc_query_data']['post__not_in']) ) {
155
  global $wp_query, $br_wc_query, $br_aapf_wc_footer_widget;
156
 
157
  $post__in = ( isset($wp_query->query_vars['post__in']) ? $wp_query->query_vars['post__in'] : array() );
177
  }
178
  self::$prepared_data['wc_query_data']['post__in'] = apply_filters('berocket_aapf_get_attribute_values_post__in_outside', $post__in);
179
  self::$prepared_data['wc_query_data']['post__not_in'] = apply_filters('berocket_aapf_get_attribute_values_post__not_in_outside', $post__not_in);
 
180
  }
181
  return $terms;
182
  }
main.php CHANGED
@@ -794,7 +794,7 @@ class BeRocket_AAPF extends BeRocket_Framework {
794
  "name" => "out_of_stock_variable_reload",
795
  "value" => '1',
796
  "class" => "out_of_stock_variable_reload",
797
- 'label_for' => __('Use it for attributes values to display more correct count with option Reload amount of products', 'BeRocket_AJAX_domain') . '<br>',
798
  ),
799
  'out_of_stock_variable_single' => array(
800
  "type" => "checkbox",
794
  "name" => "out_of_stock_variable_reload",
795
  "value" => '1',
796
  "class" => "out_of_stock_variable_reload",
797
+ 'label_for' => __('Use it for attributes values to display more correct count', 'BeRocket_AJAX_domain') . '<br>',
798
  ),
799
  'out_of_stock_variable_single' => array(
800
  "type" => "checkbox",
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://berocket.com/product/woocommerce-ajax-products-filter?utm_s
5
  Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
6
  Requires at least: 4.0
7
  Tested up to: 5.3.2
8
- Stable tag: 1.4.1.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -184,6 +184,11 @@ You can try this plugin's admin side [here](https://berocket.com/product/woocomm
184
 
185
  == Changelog ==
186
 
 
 
 
 
 
187
  = 1.4.1.3 =
188
  * Fix - "Hide variations that are out of stock" option do not work without "Additional table" add-on
189
  * Fix - WPML: "Hide variations that are out of stock" option work only on base language
5
  Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
6
  Requires at least: 4.0
7
  Tested up to: 5.3.2
8
+ Stable tag: 1.4.1.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
184
 
185
  == Changelog ==
186
 
187
+ = 1.4.1.4 =
188
+ * Fix - Correct count for attribute values with some WooCommerce Shortcodes
189
+ * Fix - Option text not correct
190
+ * Fix - Some variable products not excluded with disabled Additional table add-on
191
+
192
  = 1.4.1.3 =
193
  * Fix - "Hide variations that are out of stock" option do not work without "Additional table" add-on
194
  * Fix - WPML: "Hide variations that are out of stock" option work only on base language
woocommerce-filters.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Advanced AJAX Product Filters for WooCommerce
4
  * Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
5
  * Description: Unlimited AJAX products filters to make your shop perfect
6
- * Version: 1.4.1.3
7
  * Author: BeRocket
8
  * Requires at least: 4.0
9
  * Author URI: https://berocket.com?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
@@ -11,6 +11,6 @@
11
  * Domain Path: /languages/
12
  * WC tested up to: 3.8.1
13
  */
14
- define( "BeRocket_AJAX_filters_version", '1.4.1.3' );
15
  define( "BeRocket_AJAX_filters_file", __FILE__ );
16
  include_once('main.php');
3
  * Plugin Name: Advanced AJAX Product Filters for WooCommerce
4
  * Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
5
  * Description: Unlimited AJAX products filters to make your shop perfect
6
+ * Version: 1.4.1.4
7
  * Author: BeRocket
8
  * Requires at least: 4.0
9
  * Author URI: https://berocket.com?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
11
  * Domain Path: /languages/
12
  * WC tested up to: 3.8.1
13
  */
14
+ define( "BeRocket_AJAX_filters_version", '1.4.1.4' );
15
  define( "BeRocket_AJAX_filters_file", __FILE__ );
16
  include_once('main.php');