Advanced AJAX Product Filters - Version 1.5.6

Version Description

Download this release

Release Info

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

Code changes from version 1.5.5.4 to 1.5.6

addons/deprecated_filters/deprecated_filters.php CHANGED
@@ -36,6 +36,31 @@ class BeRocket_aapf_deprecated_compat_addon extends BeRocket_framework_addon_lib
36
  add_filter( 'BeRocket_AAPF_getall_Template_Styles', array($this, 'remove_new_templates'), 9000000 );
37
  add_filter( 'braapf_custom_user_css_replacement', array($this, 'custom_user_css_replacement') );
38
  update_option('braapf_new_filters_converted', false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
  function wp() {
41
  $BeRocket_AAPF = BeRocket_AAPF::getInstance();
36
  add_filter( 'BeRocket_AAPF_getall_Template_Styles', array($this, 'remove_new_templates'), 9000000 );
37
  add_filter( 'braapf_custom_user_css_replacement', array($this, 'custom_user_css_replacement') );
38
  update_option('braapf_new_filters_converted', false);
39
+ if( (! empty($_GET['page']) && $_GET['page'] == 'br-product-filters' )
40
+ || (! empty($_GET['post_type']) && in_array($_GET['post_type'], array('br_product_filter', 'br_filters_group'))) ) {
41
+ add_filter('berocket_display_additional_notices', array($this, 'deprecated_notice'));
42
+ }
43
+ }
44
+ function deprecated_notice($notices) {
45
+ $notices[] = array(
46
+ 'start' => 0,
47
+ 'end' => 0,
48
+ 'name' => 'aapf_remove_deprecated_filters',
49
+ 'html' => 'AJAX Product Filters. Deprecated Filters add-on enabled on your site, but it will be removed in near future. You can disable Deprecated Filters in <a href="'.admin_url('admin.php?page=br-product-filters&tab=addons').'">Plugin settings -> Add-ons tab</a>',
50
+ 'righthtml' => '',
51
+ 'rightwidth' => 0,
52
+ 'nothankswidth' => 0,
53
+ 'contentwidth' => 1600,
54
+ 'subscribe' => false,
55
+ 'priority' => 10,
56
+ 'height' => 70,
57
+ 'repeat' => false,
58
+ 'repeatcount' => 1,
59
+ 'image' => array(
60
+ 'local' => plugin_dir_url( BeRocket_AJAX_filters_file ) . 'images/attention.png',
61
+ ),
62
+ );
63
+ return $notices;
64
  }
65
  function wp() {
66
  $BeRocket_AAPF = BeRocket_AAPF::getInstance();
main.php CHANGED
@@ -2304,6 +2304,9 @@ jQuery(document).on('change', '.berocket_disable_ajax_loading', berocket_disable
2304
  $options = $this->get_option();
2305
  $args = array();
2306
  if ( apply_filters( 'berocket_aapf_is_filtered_page_check', ! empty($_GET['filters']), 'get_filter_args', $query ) ) {
 
 
 
2307
  br_aapf_args_converter( $query );
2308
 
2309
  if( self::$debug_mode ) {
@@ -3113,6 +3116,37 @@ jQuery(document).on('change', '.berocket_disable_ajax_loading', berocket_disable
3113
  update_option( 'br_filters_options', $options );
3114
  }
3115
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3116
  }
3117
  public function save_settings_callback( $settings ) {
3118
  $options = $this->get_option();
2304
  $options = $this->get_option();
2305
  $args = array();
2306
  if ( apply_filters( 'berocket_aapf_is_filtered_page_check', ! empty($_GET['filters']), 'get_filter_args', $query ) ) {
2307
+ if( $is_shortcode ) {
2308
+ $query->set('brapf_is_shortcode', true);
2309
+ }
2310
  br_aapf_args_converter( $query );
2311
 
2312
  if( self::$debug_mode ) {
3116
  update_option( 'br_filters_options', $options );
3117
  }
3118
  }
3119
+ if( $previous !== '0' && ( version_compare($previous, '1.5.6', '<') || (version_compare($previous, '2.0', '>') && version_compare($previous, '3.0.5', '<') ) ) ) {
3120
+ $deprecated_filters = false;
3121
+ if( ! empty($options['addons']) && is_array($options['addons']) ) {
3122
+ foreach($options['addons'] as $addon) {
3123
+ if( strpos($addon, 'deprecated_filters.php') !== FALSE ) {
3124
+ $deprecated_filters = true;
3125
+ break;
3126
+ }
3127
+ }
3128
+ }
3129
+ if($deprecated_filters) {
3130
+ new berocket_admin_notices(array(
3131
+ 'start' => 0,
3132
+ 'end' => 0,
3133
+ 'name' => 'aapf_remove_deprecated_filters',
3134
+ 'html' => 'AJAX Product Filters. Deprecated Filters add-on enabled on your site, but it will be removed in near future. You can disable Deprecated Filters in <a href="'.admin_url('admin.php?page=br-product-filters&tab=addons').'">Plugin settings -> Add-ons tab</a>',
3135
+ 'righthtml' => '<a class="berocket_no_thanks">Close notice</a>',
3136
+ 'rightwidth' => 200,
3137
+ 'nothankswidth' => 200,
3138
+ 'contentwidth' => 400,
3139
+ 'subscribe' => false,
3140
+ 'priority' => 20,
3141
+ 'height' => 50,
3142
+ 'repeat' => false,
3143
+ 'repeatcount' => 1,
3144
+ 'image' => array(
3145
+ 'local' => plugin_dir_url( __FILE__ ) . 'images/attention.png',
3146
+ ),
3147
+ ));
3148
+ }
3149
+ }
3150
  }
3151
  public function save_settings_callback( $settings ) {
3152
  $options = $this->get_option();
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.8
8
- Stable tag: 1.5.5.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -185,6 +185,10 @@ You can try this plugin's admin side [here](https://berocket.com/product/woocomm
185
 
186
  == Changelog ==
187
 
 
 
 
 
188
  = 1.5.5.4 =
189
  * Enhancement - Compatibility version: WooCommerce 5.7
190
  * Enhancement - Compatibility with Aelia Currency Switcher global exchange rate
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.8
8
+ Stable tag: 1.5.6
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.5.4 =
189
+ * Enhancement - Added notice for deprecated filters add-on
190
+ * Enhancement - Prepare for new update
191
+
192
  = 1.5.5.4 =
193
  * Enhancement - Compatibility version: WooCommerce 5.7
194
  * Enhancement - Compatibility with Aelia Currency Switcher global exchange rate
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.5.4
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: 5.7
13
  */
14
- define( "BeRocket_AJAX_filters_version", '1.5.5.4' );
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.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
  * Domain Path: /languages/
12
  * WC tested up to: 5.7
13
  */
14
+ define( "BeRocket_AJAX_filters_version", '1.5.6' );
15
  define( "BeRocket_AJAX_filters_file", __FILE__ );
16
  include_once('main.php');