Advanced AJAX Product Filters - Version 1.5.0.7

Version Description

  • Fix - Filters not displayed after disable Deprecated Filters add-on
  • Fix - Empty sidebar not displayed
  • Fix - Hierarchical sorting prevent error on frontend and save error to database
Download this release

Release Info

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

Code changes from version 1.5.0.6 to 1.5.0.7

includes/filters/get_terms.php CHANGED
@@ -146,7 +146,16 @@ class BeRocket_AAPF_get_terms {
146
  foreach($terms as &$term) {
147
  $term->depth = (isset($terms_sorted[$term->term_id]) ? $terms_sorted[$term->term_id] : 0);
148
  }
149
- array_multisort($array_sort, SORT_ASC, SORT_NUMERIC, $terms);
 
 
 
 
 
 
 
 
 
150
  return $terms;
151
  }
152
  public static function depth_clear($terms, $args = array(), $additional = array()) {
146
  foreach($terms as &$term) {
147
  $term->depth = (isset($terms_sorted[$term->term_id]) ? $terms_sorted[$term->term_id] : 0);
148
  }
149
+ if( is_array($array_sort) && is_array($terms) && count($array_sort) == count($terms) ) {
150
+ array_multisort($array_sort, SORT_ASC, SORT_NUMERIC, $terms);
151
+ } else {
152
+ BeRocket_error_notices::add_plugin_error(1, 'Hierarchical sort error', array(
153
+ 'error' => '$array_sort != $terms.get_terms -> hierarchical_sort',
154
+ 'terms' => $terms,
155
+ 'args' => $args,
156
+ 'additional' => $additional
157
+ ));
158
+ }
159
  return $terms;
160
  }
161
  public static function depth_clear($terms, $args = array(), $additional = array()) {
main.php CHANGED
@@ -1410,6 +1410,7 @@ jQuery(document).on('change', '.berocket_disable_ajax_loading', berocket_disable
1410
  if( version_compare($plugins[$this->info['plugin_name']], '2.9', '>') || ( version_compare($plugins[$this->info['plugin_name']], '1.5', '>=') && version_compare($plugins[$this->info['plugin_name']], '2', '<')) ) {
1411
  $filters_converted = get_option('braapf_new_filters_converted');
1412
  if( empty($filters_converted) ) {
 
1413
  require_once dirname( __FILE__ ) . '/fixes/replace_filters.php';
1414
  update_option('braapf_new_filters_converted', true);
1415
  }
@@ -1426,7 +1427,7 @@ jQuery(document).on('change', '.berocket_disable_ajax_loading', berocket_disable
1426
  $sidebars_widgets = $sidebars_widgets[$index];
1427
  global $wp_registered_widgets;
1428
  $test = $wp_registered_widgets;
1429
- if( is_array($sidebars_widgets) ) {
1430
  foreach($sidebars_widgets as $widgets) {
1431
  if( strpos($widgets, 'berocket_aapf_group') === false && strpos($widgets, 'berocket_aapf_single') === false ) {
1432
  return $is_active_sidebar;
1410
  if( version_compare($plugins[$this->info['plugin_name']], '2.9', '>') || ( version_compare($plugins[$this->info['plugin_name']], '1.5', '>=') && version_compare($plugins[$this->info['plugin_name']], '2', '<')) ) {
1411
  $filters_converted = get_option('braapf_new_filters_converted');
1412
  if( empty($filters_converted) ) {
1413
+ do_action('bapf_include_all_tempate_styles');
1414
  require_once dirname( __FILE__ ) . '/fixes/replace_filters.php';
1415
  update_option('braapf_new_filters_converted', true);
1416
  }
1427
  $sidebars_widgets = $sidebars_widgets[$index];
1428
  global $wp_registered_widgets;
1429
  $test = $wp_registered_widgets;
1430
+ if( is_array($sidebars_widgets) && count($sidebars_widgets) ) {
1431
  foreach($sidebars_widgets as $widgets) {
1432
  if( strpos($widgets, 'berocket_aapf_group') === false && strpos($widgets, 'berocket_aapf_single') === false ) {
1433
  return $is_active_sidebar;
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: 5.0
7
  Tested up to: 5.4.2
8
- Stable tag: 1.5.0.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -185,6 +185,11 @@ You can try this plugin's admin side [here](https://berocket.com/product/woocomm
185
 
186
  == Changelog ==
187
 
 
 
 
 
 
188
  = 1.5.0.6 =
189
  * Enhancement - Sub-attribute for Nested filters add-on
190
  * Fix - Replacement for user custom CSS
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: 5.0
7
  Tested up to: 5.4.2
8
+ Stable tag: 1.5.0.7
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
185
 
186
  == Changelog ==
187
 
188
+ = 1.5.0.7 =
189
+ * Fix - Filters not displayed after disable Deprecated Filters add-on
190
+ * Fix - Empty sidebar not displayed
191
+ * Fix - Hierarchical sorting prevent error on frontend and save error to database
192
+
193
  = 1.5.0.6 =
194
  * Enhancement - Sub-attribute for Nested filters add-on
195
  * Fix - Replacement for user custom CSS
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.5.0.6
7
  * Author: BeRocket
8
  * Requires at least: 5.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: 4.3
13
  */
14
- define( "BeRocket_AJAX_filters_version", '1.5.0.6' );
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.5.0.7
7
  * Author: BeRocket
8
  * Requires at least: 5.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: 4.3
13
  */
14
+ define( "BeRocket_AJAX_filters_version", '1.5.0.7' );
15
  define( "BeRocket_AJAX_filters_file", __FILE__ );
16
  include_once('main.php');