YITH WooCommerce Ajax Product Filter - Version 2.7.6

Version Description

  • Added: Suppoort to quantity input in loop
  • Added: yith-wcan-free body class
  • Fixed: Filter button doesn't appear in WooCommerce Price Filter Slider
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Ajax Product Filter
Version 2.7.6
Comparing to
See all releases

Code changes from version 2.7.5 to 2.7.6

README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
  Requires at least: 4.0
6
  Tested up to: 4.4.1
7
- Stable tag: 2.7.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -159,6 +159,12 @@ If you want to see a demonstration version of the premium plugin, you can see it
159
 
160
  == Changelog ==
161
 
 
 
 
 
 
 
162
  = 2.7.5 =
163
 
164
  * Fixed: Error on plugin activation
4
  Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
  Requires at least: 4.0
6
  Tested up to: 4.4.1
7
+ Stable tag: 2.7.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
159
 
160
  == Changelog ==
161
 
162
+ = 2.7.6 =
163
+
164
+ * Added: Suppoort to quantity input in loop
165
+ * Added: yith-wcan-free body class
166
+ * Fixed: Filter button doesn't appear in WooCommerce Price Filter Slider
167
+
168
  = 2.7.5 =
169
 
170
  * Fixed: Error on plugin activation
assets/css/frontend.css CHANGED
@@ -267,7 +267,7 @@ a.yith-wcan-price-link.active:before {
267
  border-radius: 50%;
268
  }
269
 
270
- .woocommerce .widget_price_filter .price_slider_amount button {
271
  display: none;
272
  }
273
 
267
  border-radius: 50%;
268
  }
269
 
270
+ .yith-wcan-pro.woocommerce .widget_price_filter .price_slider_amount button {
271
  display: none;
272
  }
273
 
assets/js/yith-wcan-frontend.js CHANGED
@@ -187,6 +187,9 @@ jQuery(function ($) {
187
  $(yith_wcan.pagination).empty();
188
  }
189
 
 
 
 
190
  //result count
191
  if ($(response).find(yith_wcan.result_count).length > 0) {
192
  $(yith_wcan.result_count).html($(response).find(yith_wcan.result_count).html()).show();
187
  $(yith_wcan.pagination).empty();
188
  }
189
 
190
+ // quantity fields
191
+ $('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');
192
+
193
  //result count
194
  if ($(response).find(yith_wcan.result_count).length > 0) {
195
  $(yith_wcan.result_count).html($(response).find(yith_wcan.result_count).html()).show();
assets/js/yith-wcan-frontend.min.js CHANGED
@@ -6,8 +6,9 @@ a.isArray(n.id)&&(n.id=n.id[0].substr(1));n.tag||(n.tag="div");n.vars=[];for(b=0
6
  2),g=g.replace(d[l],p[k][c]);f=a.merge(f,v(g,b))}return a(f)};a.jseldom=function(h){if(2==arguments.length&&a.isPlainObject(arguments[1]))return w.apply(this,[arguments[0],[arguments[1]]]);if(1==arguments.length||2==arguments.length&&!a.isArray(arguments[1]))return v.apply(this,arguments);if(2==arguments.length)return w.apply(this,arguments)};var r=!1;a.fn.yith_wcan_ajax_filters=function(h,p){h.preventDefault();var b=p.href,d=a(p),f=d.hasClass("yith-wcan-reset-navigation");if("undefined"==typeof b&&
7
  d.parents().hasClass("price_slider_wrapper")){d.parents("form");var k=window.location,g=k.origin+k.pathname,l=g!=k.href,c=a(".price_slider_amount #min_price").val(),m=a(".price_slider_amount #max_price").val(),b=k.href;1==l&&(b=u(b,"min_price"),b=u(b,"max_price"));b=b+(g==b?"?":"&")+a.param({min_price:c,max_price:m})}"select"==d.data("type")&&(d.parents("div.yith-woo-ajax-navigation").find("a.yit-wcan-select-open").removeClass("active"),d.parent().find("div.yith-wcan-select-wrapper").animate({visibility:"hidden",
8
  opacity:0},300));a(yith_wcan.container).html("").addClass("yith-wcan-loading");a(document).trigger("yith-wcan-ajax-loading");"undefined"!=typeof yith_wcan_frontend&&a(yith_wcan.container).css("backgroundImage","url("+yith_wcan_frontend.loader_url+")");a(yith_wcan.pagination).hide();a(yith_wcan.result_count).hide();0!=r&&(r.abort(),r=!1);r=a.ajax({url:b,success:function(c){r=!1;a(yith_wcan.container).removeClass("yith-wcan-loading");0<a(c).find(yith_wcan.container).length?a(".yit-wcan-container").html(a(c).find(yith_wcan.container)):
9
- a(".yit-wcan-container").html(a(c).find(".woocommerce-info"));0<a(c).find(yith_wcan.pagination).length?(0==a(yith_wcan.pagination).length&&a.jseldom(yith_wcan.pagination).insertAfter(a(yith_wcan.container)),a(yith_wcan.pagination).html(a(c).find(yith_wcan.pagination).html()).show()):a(yith_wcan.pagination).empty();0<a(c).find(yith_wcan.result_count).length&&a(yith_wcan.result_count).html(a(c).find(yith_wcan.result_count).html()).show();a(".yith-woo-ajax-navigation").add(".yith-wcan-sort-by").add(".yith-wcan-stock-on-sale").add(".yith-wcan-list-price-filter").each(function(){var b=
10
- a(this),d=b.attr("id");b.html(a(c).find("#"+d).html());""==b.text()?b.hide():b.show()});navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:c.pageTitle},"",b);a(document).trigger("ready");a(document).trigger("yith-wcan-ajax-filtered");if(f){var d=parseInt(a(yith_wcan.wc_price_slider.min_price).data("min")),g=parseInt(a(yith_wcan.wc_price_slider.max_price).data("max"));a(yith_wcan.wc_price_slider.wrapper).slider("values",[d,g]);a(document.body).trigger("price_slider_slide",[d,g]);
11
- a(document).trigger("yith-wcan-ajax-reset-filtered")}}})};a(yith_wcan.container).wrap('<div class="yit-wcan-container"></div>');a(".woocommerce-info").wrap('<div class="yit-wcan-container"></div>');a(document).trigger("yith-wcan-wrapped");a(document).on("click",".yith-wcan a",function(h){a(this).yith_wcan_ajax_filters(h,this)});var t=function(){a("div.yith-wcan-select-wrapper").animate({visibility:"hidden",opacity:0},0);a("a.yit-wcan-select-open").removeClass("active")};a(document).on("click","a.yit-wcan-select-open.active",
12
- function(h){h.preventDefault();a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300);a(this).parent().find("a.yit-wcan-select-open").removeClass("active")});a(document).on("click","a.yit-wcan-select-open:not(.active)",function(h){h.preventDefault();a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","1").animate({visibility:"visible",opacity:1},300);a(this).parent().find("a.yit-wcan-select-open").addClass("active")});
13
- a(document).on("ready yith-wcan-ajax-filtered",function(){a("div.yith-wcan-select-wrapper ul.yith-wcan-select li.chosen");t();a("div.yith-wcan-select-wrapper").each(function(){var h="";a(this).find("ul.yith-wcan-select li.chosen").each(function(){h+=a(this).text()+", "});h=h.substring(0,h.length-2);""!=h&&a(this).parent().find("a.yit-wcan-select-open").text(h)})});a(document).on("ready",t);a("body").on("click",function(h){a(h.target).hasClass("yit-wcan-select-open")||t()})});
 
6
  2),g=g.replace(d[l],p[k][c]);f=a.merge(f,v(g,b))}return a(f)};a.jseldom=function(h){if(2==arguments.length&&a.isPlainObject(arguments[1]))return w.apply(this,[arguments[0],[arguments[1]]]);if(1==arguments.length||2==arguments.length&&!a.isArray(arguments[1]))return v.apply(this,arguments);if(2==arguments.length)return w.apply(this,arguments)};var r=!1;a.fn.yith_wcan_ajax_filters=function(h,p){h.preventDefault();var b=p.href,d=a(p),f=d.hasClass("yith-wcan-reset-navigation");if("undefined"==typeof b&&
7
  d.parents().hasClass("price_slider_wrapper")){d.parents("form");var k=window.location,g=k.origin+k.pathname,l=g!=k.href,c=a(".price_slider_amount #min_price").val(),m=a(".price_slider_amount #max_price").val(),b=k.href;1==l&&(b=u(b,"min_price"),b=u(b,"max_price"));b=b+(g==b?"?":"&")+a.param({min_price:c,max_price:m})}"select"==d.data("type")&&(d.parents("div.yith-woo-ajax-navigation").find("a.yit-wcan-select-open").removeClass("active"),d.parent().find("div.yith-wcan-select-wrapper").animate({visibility:"hidden",
8
  opacity:0},300));a(yith_wcan.container).html("").addClass("yith-wcan-loading");a(document).trigger("yith-wcan-ajax-loading");"undefined"!=typeof yith_wcan_frontend&&a(yith_wcan.container).css("backgroundImage","url("+yith_wcan_frontend.loader_url+")");a(yith_wcan.pagination).hide();a(yith_wcan.result_count).hide();0!=r&&(r.abort(),r=!1);r=a.ajax({url:b,success:function(c){r=!1;a(yith_wcan.container).removeClass("yith-wcan-loading");0<a(c).find(yith_wcan.container).length?a(".yit-wcan-container").html(a(c).find(yith_wcan.container)):
9
+ a(".yit-wcan-container").html(a(c).find(".woocommerce-info"));0<a(c).find(yith_wcan.pagination).length?(0==a(yith_wcan.pagination).length&&a.jseldom(yith_wcan.pagination).insertAfter(a(yith_wcan.container)),a(yith_wcan.pagination).html(a(c).find(yith_wcan.pagination).html()).show()):a(yith_wcan.pagination).empty();a("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');
10
+ 0<a(c).find(yith_wcan.result_count).length&&a(yith_wcan.result_count).html(a(c).find(yith_wcan.result_count).html()).show();a(".yith-woo-ajax-navigation").add(".yith-wcan-sort-by").add(".yith-wcan-stock-on-sale").add(".yith-wcan-list-price-filter").each(function(){var b=a(this),d=b.attr("id");b.html(a(c).find("#"+d).html());""==b.text()?b.hide():b.show()});navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:c.pageTitle},"",b);a(document).trigger("ready");a(document).trigger("yith-wcan-ajax-filtered");
11
+ if(f){var d=parseInt(a(yith_wcan.wc_price_slider.min_price).data("min")),g=parseInt(a(yith_wcan.wc_price_slider.max_price).data("max"));a(yith_wcan.wc_price_slider.wrapper).slider("values",[d,g]);a(document.body).trigger("price_slider_slide",[d,g]);a(document).trigger("yith-wcan-ajax-reset-filtered")}}})};a(yith_wcan.container).wrap('<div class="yit-wcan-container"></div>');a(".woocommerce-info").wrap('<div class="yit-wcan-container"></div>');a(document).trigger("yith-wcan-wrapped");a(document).on("click",
12
+ ".yith-wcan a",function(h){a(this).yith_wcan_ajax_filters(h,this)});var t=function(){a("div.yith-wcan-select-wrapper").animate({visibility:"hidden",opacity:0},0);a("a.yit-wcan-select-open").removeClass("active")};a(document).on("click","a.yit-wcan-select-open.active",function(h){h.preventDefault();a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300);a(this).parent().find("a.yit-wcan-select-open").removeClass("active")});a(document).on("click",
13
+ "a.yit-wcan-select-open:not(.active)",function(h){h.preventDefault();a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","1").animate({visibility:"visible",opacity:1},300);a(this).parent().find("a.yit-wcan-select-open").addClass("active")});a(document).on("ready yith-wcan-ajax-filtered",function(){a("div.yith-wcan-select-wrapper ul.yith-wcan-select li.chosen");t();a("div.yith-wcan-select-wrapper").each(function(){var h="";a(this).find("ul.yith-wcan-select li.chosen").each(function(){h+=
14
+ a(this).text()+", "});h=h.substring(0,h.length-2);""!=h&&a(this).parent().find("a.yit-wcan-select-open").text(h)})});a(document).on("ready",t);a("body").on("click",function(h){a(h.target).hasClass("yit-wcan-select-open")||t()})});
includes/class.yith-wcan-admin.php CHANGED
@@ -157,7 +157,7 @@ if ( ! class_exists( 'YITH_WCAN_Admin' ) ) {
157
 
158
  /* === Fixed: not updated theme === */
159
  if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
160
- require_once( YITH_WCAN_DIR . 'plugin-fw/lib/yit-plugin-panel-wc.php' );
161
  }
162
 
163
  $this->_panel = new YIT_Plugin_Panel( $args );
157
 
158
  /* === Fixed: not updated theme === */
159
  if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
160
+ require_once( 'plugin-fw/lib/yit-plugin-panel-wc.php' );
161
  }
162
 
163
  $this->_panel = new YIT_Plugin_Panel( $args );
includes/class.yith-wcan-frontend.php CHANGED
@@ -41,6 +41,8 @@ if ( ! class_exists( 'YITH_WCAN_Frontend' ) ) {
41
 
42
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
43
 
 
 
44
  // YITH WCAN Loaded
45
  do_action( 'yith_wcan_loaded' );
46
  }
@@ -138,6 +140,18 @@ if ( ! class_exists( 'YITH_WCAN_Frontend' ) ) {
138
  }
139
  }
140
 
141
-
 
 
 
 
 
 
 
 
 
 
 
 
142
  }
143
  }
41
 
42
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
43
 
44
+ add_action( 'body_class', array( $this, 'body_class' ) );
45
+
46
  // YITH WCAN Loaded
47
  do_action( 'yith_wcan_loaded' );
48
  }
140
  }
141
  }
142
 
143
+ /**
144
+ * Add a body class(es)
145
+ *
146
+ * @param $classes The classes array
147
+ *
148
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
149
+ * @since 1.0
150
+ * @return array
151
+ */
152
+ public function body_class( $classes ) {
153
+ $classes[] = apply_filters( 'yith_wcan_body_class', 'yith-wcan-free' );
154
+ return $classes;
155
+ }
156
  }
157
  }
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Ajax Product Filter
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Product Filter offers the perfect way to filter all the products of your shop.
6
- * Version: 2.7.5
7
  * Author: yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith_wc_ajxnav
@@ -64,7 +64,7 @@ load_plugin_textdomain( 'yith-woocommerce-ajax-navigation', false, dirname( plug
64
  ! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
65
  ! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
66
  ! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
67
- ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '2.7.5' );
68
  ! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
69
  ! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
70
 
3
  * Plugin Name: YITH WooCommerce Ajax Product Filter
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Product Filter offers the perfect way to filter all the products of your shop.
6
+ * Version: 2.7.6
7
  * Author: yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith_wc_ajxnav
64
  ! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
65
  ! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
66
  ! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
67
+ ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '2.7.6' );
68
  ! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
69
  ! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
70
 
plugin-fw/init.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 2.9.9
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 2.9.10
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
plugin-fw/licence/templates/panel/activation/activation-panel.php CHANGED
@@ -22,8 +22,6 @@ $num_members_products_activate = $this->get_number_of_membership_products();
22
  <div class="yit-container product-licence-activation">
23
  <h2><?php _e( 'Yithemes License Activation', 'yith-plugin-fw' ) ?></h2>
24
 
25
- <?php $this instanceof YIT_Theme_Licence && $this->show_old_licence_message() && $this->get_old_licence_message(); ?>
26
-
27
  <div class="licence-check-section">
28
  <form method="post" id="licence-check-update" action="<?php echo admin_url( 'admin-ajax.php' ) ?>">
29
  <span class="licence-label" style="display: block;"><?php _e( 'Have you updated your licenses? Have you asked for an extension? Update information concerning your products.', 'yith-plugin-fw' ); ?></span>
22
  <div class="yit-container product-licence-activation">
23
  <h2><?php _e( 'Yithemes License Activation', 'yith-plugin-fw' ) ?></h2>
24
 
 
 
25
  <div class="licence-check-section">
26
  <form method="post" id="licence-check-update" action="<?php echo admin_url( 'admin-ajax.php' ) ?>">
27
  <span class="licence-label" style="display: block;"><?php _e( 'Have you updated your licenses? Have you asked for an extension? Update information concerning your products.', 'yith-plugin-fw' ); ?></span>