YITH WooCommerce Ajax Search - Version 1.2.2

Version Description

  • Added: Support to WooCommerce 2.3.x
  • Fixed: Minor bugs
Download this release

Release Info

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

Code changes from version 1.2.1 to 1.2.2

README.txt CHANGED
@@ -4,12 +4,12 @@ Contributors: yithemes
4
  Tags: ajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes
5
  Requires at least: 3.5.1
6
  Tested up to: 4.1
7
- Stable tag: 1.2.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.2.x Compatible.
13
 
14
  == Description ==
15
 
@@ -24,7 +24,7 @@ Did you ever forget the name of a product? Just start to write your keyphrase. A
24
  It works just like Google Suggest, but on your website, using your database.
25
 
26
 
27
- Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_ajax_search).
28
 
29
 
30
  = Installation =
@@ -36,7 +36,7 @@ YITH WooCommerce Ajax Search will add a new submenu called "Cart Messages" under
36
 
37
  = Developer =
38
 
39
- Are you a developer? Want to customize the templates or the style of the plugin? Read on the [documentation](http://yithemes.com/docs-plugins/yith_woocommerce_ajax_search/) and discover how to do that.
40
 
41
  = Support =
42
 
@@ -67,6 +67,11 @@ In WooCommerce->Settings->Ajax Search page, you can choose the minumum size of t
67
 
68
  == Changelog ==
69
 
 
 
 
 
 
70
  = 1.2.1 =
71
 
72
  * Updated: Plugin Core Framework
@@ -112,7 +117,7 @@ If you have created your own language pack, or have an update for an existing on
112
 
113
  == Documentation ==
114
 
115
- Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_ajax_search/).
116
 
117
  == Upgrade notice ==
118
 
4
  Tags: ajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes
5
  Requires at least: 3.5.1
6
  Tested up to: 4.1
7
+ Stable tag: 1.2.2
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.3.x Compatible.
13
 
14
  == Description ==
15
 
24
  It works just like Google Suggest, but on your website, using your database.
25
 
26
 
27
+ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woocommerce-ajax-search/).
28
 
29
 
30
  = Installation =
36
 
37
  = Developer =
38
 
39
+ Are you a developer? Want to customize the templates or the style of the plugin? Read on the [documentation](http://yithemes.com/docs-plugins/yith-woocommerce-ajax-search/) and discover how to do that.
40
 
41
  = Support =
42
 
67
 
68
  == Changelog ==
69
 
70
+ = 1.2.2 =
71
+
72
+ * Added: Support to WooCommerce 2.3.x
73
+ * Fixed: Minor bugs
74
+
75
  = 1.2.1 =
76
 
77
  * Updated: Plugin Core Framework
117
 
118
  == Documentation ==
119
 
120
+ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woocommerce-ajax-search/).
121
 
122
  == Upgrade notice ==
123
 
assets/images/ajax-loader.gif ADDED
Binary file
assets/js/frontend.js CHANGED
@@ -9,7 +9,8 @@ jQuery(document).ready(function($){
9
  "use strict";
10
 
11
  var el = $('#yith-s'),
12
- loader_icon = el.data('loader-icon') == '' ? woocommerce_params.ajax_loader_url : el.data('loader-icon'),
 
13
  min_chars = el.data('min-chars');
14
 
15
  el.autocomplete({
@@ -28,4 +29,4 @@ jQuery(document).ready(function($){
28
  }
29
  }
30
  });
31
- });
9
  "use strict";
10
 
11
  var el = $('#yith-s'),
12
+ def_loader = ( typeof woocommerce_params != 'undefined' && typeof woocommerce_params.ajax_loader_url != 'undefined' ) ? woocommerce_params.ajax_loader_url : yith_wcas_params.loading,
13
+ loader_icon = el.data('loader-icon') == '' ? def_loader : el.data('loader-icon'),
14
  min_chars = el.data('min-chars');
15
 
16
  el.autocomplete({
29
  }
30
  }
31
  });
32
+ });
assets/js/frontend.min.js CHANGED
@@ -1,2 +1,2 @@
1
- jQuery(document).ready(function(b){var a=b("#yith-s"),c=""==a.data("loader-icon")?woocommerce_params.ajax_loader_url:a.data("loader-icon"),d=a.data("min-chars");a.autocomplete({minChars:d,appendTo:".yith-ajaxsearchform-container",serviceUrl:woocommerce_params.ajax_url+"?action=yith_ajax_search_products",onSearchStart:function(){b(this).css("background","url("+c+") no-repeat right center")},onSearchComplete:function(){b(this).css("background","transparent")},onSelect:function(a){-1!=a.id&&(window.location.href=
2
- a.url)}})});
1
+ jQuery(document).ready(function(b){var a=b("#yith-s"),c="undefined"!=typeof woocommerce_params&&"undefined"!=typeof woocommerce_params.ajax_loader_url?woocommerce_params.ajax_loader_url:yith_wcas_params.loading,d=""==a.data("loader-icon")?c:a.data("loader-icon"),c=a.data("min-chars");a.autocomplete({minChars:c,appendTo:".yith-ajaxsearchform-container",serviceUrl:woocommerce_params.ajax_url+"?action=yith_ajax_search_products",onSearchStart:function(){b(this).css("background","url("+d+") no-repeat right center")},
2
+ onSearchComplete:function(){b(this).css("background","transparent")},onSelect:function(a){-1!=a.id&&(window.location.href=a.url)}})});
class.yith-wcas-admin.php CHANGED
@@ -61,7 +61,7 @@ if( !class_exists( 'YITH_WCAS_Admin' ) ) {
61
  * @access public
62
  * @since 1.0.0
63
  */
64
- public $doc_url = 'http://yithemes.com/docs-plugins/yith_woocommerce_ajax_search/';
65
 
66
  /**
67
  * Constructor
61
  * @access public
62
  * @since 1.0.0
63
  */
64
+ public $doc_url = 'http://yithemes.com/docs-plugins/yith-woocommerce-ajax-search/';
65
 
66
  /**
67
  * Constructor
class.yith-wcas-frontend.php CHANGED
@@ -52,6 +52,9 @@ if( !class_exists( 'YITH_WCAS_Frontend' ) ) {
52
 
53
  $css = file_exists( get_stylesheet_directory() . '/woocommerce/yith_ajax_search.css' ) ? get_stylesheet_directory_uri() . '/woocommerce/yith_ajax_search.css' : YITH_WCAS_URL . 'assets/css/yith_wcas_ajax_search.css';
54
  wp_enqueue_style( 'yith_wcas_frontend', $css );
 
 
 
55
  }
56
  }
57
  }
52
 
53
  $css = file_exists( get_stylesheet_directory() . '/woocommerce/yith_ajax_search.css' ) ? get_stylesheet_directory_uri() . '/woocommerce/yith_ajax_search.css' : YITH_WCAS_URL . 'assets/css/yith_wcas_ajax_search.css';
54
  wp_enqueue_style( 'yith_wcas_frontend', $css );
55
+ wp_localize_script( 'yith_wcas_frontend', 'yith_wcas_params', array(
56
+ 'loading' => YITH_WCAS_ASSETS_IMAGES_URL.'ajax-loader.gif'
57
+ ));
58
  }
59
  }
60
  }
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.2.1
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yit
@@ -70,7 +70,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
70
  if ( defined( 'YITH_WCAS_VERSION' ) ){
71
  return;
72
  }else{
73
- define( 'YITH_WCAS_VERSION', '1.2.1' );
74
  }
75
 
76
  if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
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.2.2
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yit
70
  if ( defined( 'YITH_WCAS_VERSION' ) ){
71
  return;
72
  }else{
73
+ define( 'YITH_WCAS_VERSION', '1.2.2' );
74
  }
75
 
76
  if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
plugin-fw/lib/yit-metabox.php CHANGED
@@ -158,7 +158,7 @@ if ( ! class_exists( 'YIT_Metabox' ) ) {
158
  wp_enqueue_style( 'jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all' );
159
 
160
  if( function_exists( 'WC' ) ){
161
- wp_enqueue_script( 'woocommerce_admin' );
162
  wp_enqueue_script('ajax-chosen');
163
  }
164
  }
158
  wp_enqueue_style( 'jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all' );
159
 
160
  if( function_exists( 'WC' ) ){
161
+
162
  wp_enqueue_script('ajax-chosen');
163
  }
164
  }
plugin-fw/lib/yit-upgrade.php CHANGED
@@ -54,7 +54,6 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
54
  */
55
  public function __construct() {
56
  add_filter( 'upgrader_pre_download', array( $this, 'upgrader_pre_download') , 10, 3 );
57
- add_filter( 'http_request_host_is_external', '__return_true' );
58
  add_action( 'update-custom_upgrade-plugin-multisite', array( $this, 'upgrade_plugin_multisite' ) );
59
 
60
  if( is_network_admin() ){
54
  */
55
  public function __construct() {
56
  add_filter( 'upgrader_pre_download', array( $this, 'upgrader_pre_download') , 10, 3 );
 
57
  add_action( 'update-custom_upgrade-plugin-multisite', array( $this, 'upgrade_plugin_multisite' ) );
58
 
59
  if( is_network_admin() ){
plugin-fw/licence/lib/yit-licence.php CHANGED
@@ -169,7 +169,7 @@ if ( ! class_exists( 'YIT_Licence' ) ) {
169
  $product = $this->get_product( $product_init );
170
 
171
  $args = array(
172
- 'email' => sanitize_email( $_REQUEST['email'] ),
173
  'licence_key' => sanitize_text_field( $_REQUEST['licence_key'] ),
174
  'product_id' => sanitize_text_field( $product['product_id'] ),
175
  'secret_key' => sanitize_text_field( $product['secret_key'] ),
@@ -190,7 +190,7 @@ if ( ! class_exists( 'YIT_Licence' ) ) {
190
  if ( $body && is_array( $body ) && isset( $body['activated'] ) && $body['activated'] ) {
191
 
192
  $option[$product['product_id']] = array(
193
- 'email' => $args['email'],
194
  'licence_key' => $args['licence_key'],
195
  'licence_expires' => $body['licence_expires'],
196
  'message' => $body['message'],
@@ -237,7 +237,7 @@ if ( ! class_exists( 'YIT_Licence' ) ) {
237
  }
238
 
239
  $args = array(
240
- 'email' => $licence[$product_id]['email'],
241
  'licence_key' => $licence[$product_id]['licence_key'],
242
  'product_id' => $product_id,
243
  'secret_key' => $product['secret_key'],
169
  $product = $this->get_product( $product_init );
170
 
171
  $args = array(
172
+ 'email' => urlencode( sanitize_email( $_REQUEST['email'] ) ),
173
  'licence_key' => sanitize_text_field( $_REQUEST['licence_key'] ),
174
  'product_id' => sanitize_text_field( $product['product_id'] ),
175
  'secret_key' => sanitize_text_field( $product['secret_key'] ),
190
  if ( $body && is_array( $body ) && isset( $body['activated'] ) && $body['activated'] ) {
191
 
192
  $option[$product['product_id']] = array(
193
+ 'email' => urldecode( $args['email'] ),
194
  'licence_key' => $args['licence_key'],
195
  'licence_expires' => $body['licence_expires'],
196
  'message' => $body['message'],
237
  }
238
 
239
  $args = array(
240
+ 'email' => urlencode( $licence[$product_id]['email'] ),
241
  'licence_key' => $licence[$product_id]['licence_key'],
242
  'product_id' => $product_id,
243
  'secret_key' => $product['secret_key'],
plugin-fw/licence/templates/panel/activation/activation-panel.php CHANGED
@@ -95,7 +95,8 @@ $banned_products = isset( $no_active_products[ '107' ] ) ? $no_active_produc
95
  <td><a class="button-licence licence-renew" href="<?php echo $this->get_renewing_uri( $info['licence']['licence_key'] ) ?>" target="_blank"><?php _e( 'Renew', 'yit' ) ?></a></td>
96
  </tr>
97
  <?php endforeach; ?>
98
- </tbody>
 
99
  <?php endif;?>
100
 
101
  <!-- Banned Products -->
95
  <td><a class="button-licence licence-renew" href="<?php echo $this->get_renewing_uri( $info['licence']['licence_key'] ) ?>" target="_blank"><?php _e( 'Renew', 'yit' ) ?></a></td>
96
  </tr>
97
  <?php endforeach; ?>
98
+ </tbody>
99
+ </table>
100
  <?php endif;?>
101
 
102
  <!-- Banned Products -->
plugin-fw/templates/metaboxes/types/ajax-products.php CHANGED
@@ -11,7 +11,7 @@
11
  if ( ! defined( 'ABSPATH' ) ) {
12
  exit;
13
  } // Exit if accessed directly
14
-
15
  extract( $args );
16
  $is_multiple = isset( $multiple ) && $multiple;
17
  $multiple = ( $is_multiple ) ? ' multiple' : '';
11
  if ( ! defined( 'ABSPATH' ) ) {
12
  exit;
13
  } // Exit if accessed directly
14
+ wp_enqueue_script( 'woocommerce_admin' );
15
  extract( $args );
16
  $is_multiple = isset( $multiple ) && $multiple;
17
  $multiple = ( $is_multiple ) ? ' multiple' : '';