YITH WooCommerce Ajax Search - Version 1.5.7

Version Description

  • Released: Jun 28, 2018 =
  • Fix: Fixed compatibility class loading
  • Update: Plugin Core 3.0.16
Download this release

Release Info

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

Code changes from version 1.5.6 to 1.5.7

README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
5
  Requires at least: 4.0.0
6
  Tested up to: 4.9.6
7
- Stable tag: 1.5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -139,17 +139,21 @@ If you have created your own language pack for YITH WooCommerce Ajax Search, or
139
 
140
  == Changelog ==
141
 
142
- = 1.5.6 - Released: May 15, 2018 =
143
- New: Support to WordPress 4.9.6 RC2
144
- New: Support to WooCommerce 3.4.0 RC1
145
- Update: Plugin Core 3.0.15
 
 
 
 
146
 
147
  = 1.5.5 - Released: Jan 31, 2018 =
148
- New: Support to WooCommerce 3.3.x
149
- Update: Plugin Core 3.0.11
150
 
151
  = 1.5.4 - Released: Nov 06, 2017 =
152
- Update: Plugin Core
153
 
154
  = 1.5.3 - Released: May 25, 2017 =
155
  Fix: Plugin Core integration
4
  Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
5
  Requires at least: 4.0.0
6
  Tested up to: 4.9.6
7
+ Stable tag: 1.5.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
139
 
140
  == Changelog ==
141
 
142
+ = 1.5.7 - Released: Jun 28, 2018 =
143
+ * Fix: Fixed compatibility class loading
144
+ * Update: Plugin Core 3.0.16
145
+
146
+ = 1.5.6 - Released: May 17, 2018 =
147
+ * New: Support to WordPress 4.9.6 RC2
148
+ * New: Support to WooCommerce 3.4.0 RC1
149
+ * Update: Plugin Core 3.0.15
150
 
151
  = 1.5.5 - Released: Jan 31, 2018 =
152
+ * New: Support to WooCommerce 3.3.x
153
+ * Update: Plugin Core 3.0.11
154
 
155
  = 1.5.4 - Released: Nov 06, 2017 =
156
+ * Update: Plugin Core
157
 
158
  = 1.5.3 - Released: May 25, 2017 =
159
  Fix: Plugin Core integration
class.yith-wcas.php CHANGED
@@ -58,9 +58,7 @@ if ( !class_exists( 'YITH_WCAS' ) ) {
58
  if ( class_exists( 'YITH_JetPack' ) ) {
59
  include_once( YJP_DIR . 'plugin-fw/yit-woocommerce-compatibility.php' );
60
  } else {
61
- global $plugin_fw_data;
62
- $plugin_fw_file = array_shift( $plugin_fw_data );
63
- require_once( plugin_dir_path( $plugin_fw_file ) . 'yit-woocommerce-compatibility.php' );
64
  }
65
  }
66
 
58
  if ( class_exists( 'YITH_JetPack' ) ) {
59
  include_once( YJP_DIR . 'plugin-fw/yit-woocommerce-compatibility.php' );
60
  } else {
61
+ include_once( YITH_WCAS_DIR . 'plugin-fw/yit-woocommerce-compatibility.php' );
 
 
62
  }
63
  }
64
 
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.5.6
7
  * Author: YITHEMES
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith-woocommerce-ajax-search
@@ -67,7 +67,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
67
  if ( defined( 'YITH_WCAS_VERSION' ) ){
68
  return;
69
  }else{
70
- define( 'YITH_WCAS_VERSION', '1.5.6' );
71
  }
72
 
73
  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.5.7
7
  * Author: YITHEMES
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith-woocommerce-ajax-search
67
  if ( defined( 'YITH_WCAS_VERSION' ) ){
68
  return;
69
  }else{
70
+ define( 'YITH_WCAS_VERSION', '1.5.7' );
71
  }
72
 
73
  if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.0.15
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
- * @version 3.0.15
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.0.16
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
+ * @version 3.0.16
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
plugin-fw/lib/privacy/yit-privacy-plugin-abstract.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
3
+
4
+ if ( !class_exists( 'YITH_Privacy_Plugin_Abstract' ) ) {
5
+ class YITH_Privacy_Plugin_Abstract {
6
+ private $_name;
7
+
8
+ public function __construct( $name ) {
9
+ $this->_name = $name;
10
+ $this->init();
11
+ }
12
+
13
+ protected function init() {
14
+ add_filter( 'yith_plugin_fw_privacy_guide_content', array( $this, 'add_message_in_section' ), 10, 2 );
15
+ }
16
+
17
+ public function add_message_in_section( $html, $section ) {
18
+ if ( $message = $this->get_privacy_message( $section ) ) {
19
+ $html .= "<p class='privacy-policy-tutorial'><strong>{$this->_name}</strong></p>";
20
+ $html .= $message;
21
+ }
22
+ return $html;
23
+ }
24
+
25
+ public function get_privacy_message( $section ) {
26
+ return '';
27
+ }
28
+ }
29
+ }
plugin-fw/lib/privacy/yit-privacy.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
3
+
4
+ if ( !class_exists( 'YITH_Privacy' ) ) {
5
+ /**
6
+ * Class YITH_Privacy
7
+ * Privacy Class
8
+ *
9
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
10
+ */
11
+ class YITH_Privacy {
12
+ private static $_instance;
13
+
14
+ private $_title;
15
+
16
+ public static function get_instance() {
17
+ return !is_null( self::$_instance ) ? self::$_instance : self::$_instance = new self();
18
+ }
19
+
20
+ /**
21
+ * YITH_Privacy constructor.
22
+ */
23
+ private function __construct() {
24
+ $this->_title = apply_filters( 'yith_plugin_fw_privacy_policy_guide_title', _x( 'YITH Plugins', 'Privacy Policy Guide Title', 'yith-plugin-fw' ) );
25
+ add_action( 'admin_init', array( $this, 'add_privacy_message' ) );
26
+ }
27
+
28
+ /**
29
+ * Adds the privacy message on YITH privacy page.
30
+ */
31
+ public function add_privacy_message() {
32
+ if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
33
+ $content = $this->get_privacy_message();
34
+
35
+ if ( $content ) {
36
+ wp_add_privacy_policy_content( $this->_title, $this->get_privacy_message() );
37
+ }
38
+ }
39
+ }
40
+
41
+ /**
42
+ * get the privacy message
43
+ *
44
+ * @return string
45
+ */
46
+ public function get_privacy_message() {
47
+ $privacy_content_path = YIT_CORE_PLUGIN_TEMPLATE_PATH . '/privacy/html-policy-content.php';
48
+ ob_start();
49
+ $sections = $this->get_sections();
50
+ if ( file_exists( $privacy_content_path ) )
51
+ include $privacy_content_path;
52
+
53
+ return apply_filters( 'yith_wcbk_privacy_policy_content', ob_get_clean() );
54
+ }
55
+
56
+ public function get_sections() {
57
+ return apply_filters( 'yith_wcbk_privacy_policy_content_sections', array(
58
+ 'general' => array(
59
+ 'tutorial' => _x( 'This sample language includes the basics around what personal data your store may be collecting, storing and sharing, as well as who may have access to that data. Depending on what settings are enabled and which additional plugins are used, the specific information shared by your store will vary. We recommend consulting with a lawyer when deciding what information to disclose on your privacy policy.', 'Privacy Policy Content', 'yith-plugin-fw' ),
60
+ 'description' => '',
61
+ ),
62
+ 'collect_and_store' => array(
63
+ 'title' => _x( 'What we collect and store', 'Privacy Policy Content', 'yith-plugin-fw' )
64
+ ),
65
+ 'has_access' => array(
66
+ 'title' => _x( 'Who on our team has access', 'Privacy Policy Content', 'yith-plugin-fw' )
67
+ ),
68
+ 'share' => array(
69
+ 'title' => _x( 'What we share with others', 'Privacy Policy Content', 'yith-plugin-fw' ),
70
+ ),
71
+ 'payments' => array(
72
+ 'title' => _x( 'Payments', 'Privacy Policy Content', 'yith-plugin-fw' )
73
+ ),
74
+ ) );
75
+ }
76
+ }
77
+ }
78
+
79
+ YITH_Privacy::get_instance();
plugin-fw/templates/privacy/html-policy-content.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var array $sections
4
+ */
5
+ ?>
6
+ <div class="wp-suggested-text">
7
+ <?php do_action( 'yith_plugin_fw_privacy_guide_content_before' ); ?>
8
+
9
+ <?php
10
+ foreach ( $sections as $key => $section ) {
11
+ $action = "yith_plugin_fw_privacy_guide_content_{$key}";
12
+ $content = apply_filters( 'yith_plugin_fw_privacy_guide_content', '', $key );
13
+
14
+ if ( has_action( $action ) || !empty( $section[ 'tutorial' ] ) || !empty( $section[ 'description' ] ) || $content ) {
15
+ if ( !empty( $section[ 'title' ] ) ) {
16
+ echo "<h2>{$section['title']}</h2>";
17
+ }
18
+
19
+ if ( !empty( $section[ 'tutorial' ] ) ) {
20
+ echo "<p class='privacy-policy-tutorial'>{$section['tutorial']}</p>";
21
+ }
22
+
23
+ if ( !empty( $section[ 'description' ] ) ) {
24
+ echo "<p>{$section['description']}</p>";
25
+ }
26
+
27
+ if ( !empty( $content ) ) {
28
+ echo $content;
29
+ }
30
+ }
31
+
32
+ do_action( $action );
33
+ }
34
+ ?>
35
+
36
+ <?php do_action( 'yith_plugin_fw_privacy_guide_content_after' ); ?>
37
+ </div>
plugin-fw/yit-plugin.php CHANGED
@@ -37,6 +37,8 @@ include_once( 'lib/yit-pointers.php');
37
  include_once( 'lib/yit-icons.php');
38
  include_once( 'lib/yit-assets.php');
39
  include_once( 'lib/yit-debug.php');
 
 
40
 
41
  // load from theme folder...
42
  load_textdomain( 'yith-plugin-fw', get_template_directory() . '/core/plugin-fw/yith-plugin-fw-' . apply_filters( 'plugin_locale', get_locale(), 'yith-plugin-fw' ) . '.mo' )
37
  include_once( 'lib/yit-icons.php');
38
  include_once( 'lib/yit-assets.php');
39
  include_once( 'lib/yit-debug.php');
40
+ include_once( 'lib/privacy/yit-privacy.php' );
41
+ include_once( 'lib/privacy/yit-privacy-plugin-abstract.php' );
42
 
43
  // load from theme folder...
44
  load_textdomain( 'yith-plugin-fw', get_template_directory() . '/core/plugin-fw/yith-plugin-fw-' . apply_filters( 'plugin_locale', get_locale(), 'yith-plugin-fw' ) . '.mo' )