YITH WooCommerce Ajax Search - Version 1.1.1

Version Description

  • Fixed: Settings link doesn't work on WooCommerce 2.1.1
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Ajax Search
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1.0 to 1.1.1

README.txt CHANGED
@@ -4,12 +4,12 @@ Contributors: yithemes
4
  Tags: ajax, search, woocommerce, products, themes, yit, e-commerce, shop
5
  Requires at least: 3.5.1
6
  Tested up to: 3.8.1
7
- Stable tag: 1.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  YITH WooCommerce Ajax Search allows your users to search products in real time.
12
- WooCommerce Compatible up to 2.1.x
13
 
14
  == Description ==
15
 
@@ -73,6 +73,10 @@ In WooCommerce->Settings->Ajax Search page, you can choose the minumum size of t
73
 
74
  == Changelog ==
75
 
 
 
 
 
76
  = 1.1.0 =
77
 
78
  * Added: Support to WooCommerce 2.1.x
4
  Tags: ajax, search, woocommerce, products, themes, yit, e-commerce, shop
5
  Requires at least: 3.5.1
6
  Tested up to: 3.8.1
7
+ Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  YITH WooCommerce Ajax Search allows your users to search products in real time.
12
+ WooCommerce 2.1.x Compatible.
13
 
14
  == Description ==
15
 
73
 
74
  == Changelog ==
75
 
76
+ = 1.1.1 =
77
+
78
+ * Fixed: Settings link doesn't work on WooCommerce 2.1.1
79
+
80
  = 1.1.0 =
81
 
82
  * Added: Support to WooCommerce 2.1.x
assets/css/admin.css CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Search
6
- * @version 1.1.0
7
  */
8
 
9
  .yith_woocommerce_slider {
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Search
6
+ * @version 1.1.1
7
  */
8
 
9
  .yith_woocommerce_slider {
assets/css/yith_wcas_ajax_search.css CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Search
6
- * @version 1.1.0
7
  */
8
 
9
  /* search autocomplete */
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Search
6
+ * @version 1.1.1
7
  */
8
 
9
  /* search autocomplete */
assets/js/frontend.js CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Search
6
- * @version 1.1.0
7
  */
8
  jQuery(document).ready(function($){
9
 
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Search
6
+ * @version 1.1.1
7
  */
8
  jQuery(document).ready(function($){
9
 
assets/js/frontend.min.js CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Search
6
- * @version 1.1.0
7
  */
8
  jQuery(document).ready(function($){
9
 
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Search
6
+ * @version 1.1.1
7
  */
8
  jQuery(document).ready(function($){
9
 
class.yith-wcas-admin.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
- * @version 1.1.0
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
@@ -379,7 +379,17 @@ if( !class_exists( 'YITH_WCAS_Admin' ) ) {
379
  * @since 1.0.0
380
  */
381
  public function admin_update_option($value) {
382
- update_option( $value['id'], woocommerce_clean($_POST[$value['id']]) );
 
 
 
 
 
 
 
 
 
 
383
  }
384
 
385
  /**
@@ -426,8 +436,17 @@ if( !class_exists( 'YITH_WCAS_Admin' ) ) {
426
  */
427
  public function action_links( $links ) {
428
 
 
 
 
 
 
 
 
 
 
429
  $plugin_links = array(
430
- '<a href="' . admin_url( 'admin.php?page=woocommerce_settings&tab=yith_wcas' ) . '">' . __( 'Settings', 'yit' ) . '</a>',
431
  '<a href="' . $this->doc_url . '">' . __( 'Docs', 'yit' ) . '</a>',
432
  );
433
 
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
379
  * @since 1.0.0
380
  */
381
  public function admin_update_option($value) {
382
+
383
+ global $woocommerce;
384
+
385
+ if ( version_compare( preg_replace( '/-beta-([0-9]+)/', '', $woocommerce->version ), '2.1', '<' ) ) {
386
+ $wc_clean = 'woocommerce_clean';
387
+ }
388
+ else {
389
+ $wc_clean = 'wc_clean';
390
+ }
391
+
392
+ update_option( $value['id'], $wc_clean($_POST[$value['id']]) );
393
  }
394
 
395
  /**
436
  */
437
  public function action_links( $links ) {
438
 
439
+ global $woocommerce;
440
+
441
+ if ( version_compare( preg_replace( '/-beta-([0-9]+)/', '', $woocommerce->version ), '2.1', '<' ) ) {
442
+ $wc_clean = 'woocommerce_settings';
443
+ }
444
+ else {
445
+ $wc_clean = 'wc-settings';
446
+ }
447
+
448
  $plugin_links = array(
449
+ '<a href="' . admin_url( 'admin.php?page=' . $wc_clean . '&tab=yith_wcas' ) . '">' . __( 'Settings', 'yit' ) . '</a>',
450
  '<a href="' . $this->doc_url . '">' . __( 'Docs', 'yit' ) . '</a>',
451
  );
452
 
class.yith-wcas-frontend.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
- * @version 1.1.0
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
class.yith-wcas.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
- * @version 1.1.0
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
@@ -22,7 +22,7 @@ if( !class_exists( 'YITH_WCAS' ) ) {
22
  * @var string
23
  * @since 1.0.0
24
  */
25
- public $version = '1.1.0';
26
 
27
  /**
28
  * Plugin object
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
22
  * @var string
23
  * @since 1.0.0
24
  */
25
+ public $version = '1.1.1';
26
 
27
  /**
28
  * Plugin object
functions.yith-wcas.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
- * @version 1.1.0
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Ajax Search
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Search allows your users to search products in real time.
6
- * Version: 1.1.0
7
  * Author: Your Inspiration Themes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yit
@@ -11,7 +11,7 @@
11
  *
12
  * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Ajax Search
14
- * @version 1.1.0
15
  */
16
  /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
3
  * Plugin Name: YITH WooCommerce Ajax Search
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Search allows your users to search products in real time.
6
+ * Version: 1.1.1
7
  * Author: Your Inspiration Themes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yit
11
  *
12
  * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Ajax Search
14
+ * @version 1.1.1
15
  */
16
  /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
templates/yith-woocommerce-ajax-search.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
- * @version 1.0.0
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
uninstall.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
- * @version 1.0.0
8
  */
9
 
10
  // If uninstall not called from WordPress exit
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
  */
9
 
10
  // If uninstall not called from WordPress exit
widgets/class.yith-wcas-ajax-search.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
- * @version 1.0.0
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly