YITH WooCommerce Ajax Search - Version 1.22.2

Version Description

  • Released on 10 August 2022 =
  • Fix: Gutenberg block layout style
Download this release

Release Info

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

Code changes from version 1.22.1 to 1.22.2

includes/class.yith-wcas-admin.php CHANGED
@@ -71,11 +71,22 @@ if ( ! class_exists( 'YITH_WCAS_Admin' ) ) {
71
  add_filter( 'yith_show_plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 5 );
72
 
73
  add_action( 'yith_ajax_search_premium', array( $this, 'premium_tab' ) );
 
74
 
75
  // YITH WCAS Loaded.
76
  do_action( 'yith_wcas_loaded' );
77
  }
78
 
 
 
 
 
 
 
 
 
 
 
79
 
80
  /**
81
  * Gutenberg Integration
71
  add_filter( 'yith_show_plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 5 );
72
 
73
  add_action( 'yith_ajax_search_premium', array( $this, 'premium_tab' ) );
74
+ add_action( 'after_setup_theme', array( $this, 'add_editor_styles' ) );
75
 
76
  // YITH WCAS Loaded.
77
  do_action( 'yith_wcas_loaded' );
78
  }
79
 
80
+ /**
81
+ * Add editor style to WordPress full site editor
82
+ *
83
+ * @return void
84
+ * @since 1.22.2
85
+ */
86
+ public function add_editor_styles() {
87
+ $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';
88
+ add_editor_style( $css );
89
+ }
90
 
91
  /**
92
  * Gutenberg Integration
includes/class.yith-wcas-frontend.php CHANGED
@@ -28,7 +28,7 @@ if ( ! class_exists( 'YITH_WCAS_Frontend' ) ) {
28
  public function __construct() {
29
 
30
  // custom styles and javascript.
31
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
32
  }
33
 
34
  /**
@@ -39,27 +39,8 @@ if ( ! class_exists( 'YITH_WCAS_Frontend' ) ) {
39
  * @since 1.0.0
40
  */
41
  public function enqueue_styles_scripts() {
42
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
43
- wp_register_script( 'yith_autocomplete', YITH_WCAS_URL . 'assets/js/yith-autocomplete' . $suffix . '.js', array( 'jquery' ), '1.2.7', true );
44
- wp_register_script( 'yith_wcas_jquery-autocomplete', YITH_WCAS_URL . 'assets/js/devbridge-jquery-autocomplete' . $suffix . '.js', array( 'jquery' ), '1.2.7', true );
45
-
46
- wp_register_script( 'yith_wcas_frontend', YITH_WCAS_URL . 'assets/js/frontend' . $suffix . '.js', array( 'jquery' ), '1.0', true );
47
-
48
- $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';
49
- wp_enqueue_style( 'yith_wcas_frontend', $css, array(), YITH_WCAS_VERSION );
50
-
51
- wp_localize_script(
52
- 'yith_wcas_frontend',
53
- 'yith_wcas_params',
54
- array(
55
- 'loading' => YITH_WCAS_ASSETS_IMAGES_URL . 'ajax-loader.gif',
56
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
57
-
58
- )
59
- );
60
-
61
  wp_enqueue_script( 'yith_autocomplete' );
62
-
63
  }
64
  }
65
  }
28
  public function __construct() {
29
 
30
  // custom styles and javascript.
31
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ), 20 );
32
  }
33
 
34
  /**
39
  * @since 1.0.0
40
  */
41
  public function enqueue_styles_scripts() {
42
+ wp_enqueue_style( 'yith_wcas_frontend' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  wp_enqueue_script( 'yith_autocomplete' );
 
44
  }
45
  }
46
  }
includes/class.yith-wcas.php CHANGED
@@ -60,7 +60,8 @@ if ( ! class_exists( 'YITH_WCAS' ) ) {
60
 
61
  add_action( 'wp_ajax_yith_ajax_search_products', array( $this, 'ajax_search_products' ) );
62
  add_action( 'wp_ajax_nopriv_yith_ajax_search_products', array( $this, 'ajax_search_products' ) );
63
-
 
64
  // register shortcode.
65
  add_shortcode( 'yith_woocommerce_ajax_search', array( $this, 'add_woo_ajax_search_shortcode' ) );
66
 
@@ -72,6 +73,33 @@ if ( ! class_exists( 'YITH_WCAS' ) ) {
72
  }
73
 
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  /**
76
  * Load Plugin Framework
77
  *
60
 
61
  add_action( 'wp_ajax_yith_ajax_search_products', array( $this, 'ajax_search_products' ) );
62
  add_action( 'wp_ajax_nopriv_yith_ajax_search_products', array( $this, 'ajax_search_products' ) );
63
+ add_action( 'wp_enqueue_scripts', array( $this, 'register_styles_scripts' ) );
64
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_scripts' ) );
65
  // register shortcode.
66
  add_shortcode( 'yith_woocommerce_ajax_search', array( $this, 'add_woo_ajax_search_shortcode' ) );
67
 
73
  }
74
 
75
 
76
+ /**
77
+ * Register styles and scripts
78
+ *
79
+ * @access public
80
+ * @return void
81
+ * @since 1.22.2
82
+ */
83
+ public function register_styles_scripts() {
84
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
85
+ wp_register_script( 'yith_autocomplete', YITH_WCAS_URL . 'assets/js/yith-autocomplete' . $suffix . '.js', array( 'jquery' ), YITH_WCAS_VERSION, true );
86
+ wp_register_script( 'yith_wcas_jquery-autocomplete', YITH_WCAS_URL . 'assets/js/devbridge-jquery-autocomplete' . $suffix . '.js', array( 'jquery' ), YITH_WCAS_VERSION, true );
87
+ wp_register_script( 'yith_wcas_frontend', YITH_WCAS_URL . 'assets/js/frontend' . $suffix . '.js', array( 'jquery' ), YITH_WCAS_VERSION, true );
88
+ $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';
89
+ wp_register_style( 'yith_wcas_frontend', $css, array(), YITH_WCAS_VERSION );
90
+
91
+ wp_localize_script(
92
+ 'yith_wcas_frontend',
93
+ 'yith_wcas_params',
94
+ array(
95
+ 'loading' => YITH_WCAS_ASSETS_IMAGES_URL . 'ajax-loader.gif',
96
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
97
+
98
+ )
99
+ );
100
+
101
+ }
102
+
103
  /**
104
  * Load Plugin Framework
105
  *
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Ajax Search
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/
5
  * Description: <code><strong>YITH WooCommerce Ajax Search</strong></code> is the plugin that allows you to search for a specific product by inserting a few characters. Thanks to <strong>Ajax Search</strong>, users can quickly find the contents they are interested in without wasting time among site pages. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 1.22.1
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-ajax-search
@@ -13,7 +13,7 @@
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Ajax Search
16
- * @version 1.22.0
17
  */
18
 
19
  /*
@@ -71,44 +71,15 @@ if ( ! function_exists( 'yith_plugin_registration_hook' ) ) {
71
 
72
  register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
73
 
74
-
75
- if ( defined( 'YITH_WCAS_VERSION' ) ) {
76
- return;
77
- } else {
78
- define( 'YITH_WCAS_VERSION', '1.22.1' );
79
- }
80
-
81
- if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
82
- define( 'YITH_WCAS_FREE_INIT', plugin_basename( __FILE__ ) );
83
- }
84
-
85
- if ( ! defined( 'YITH_WCAS' ) ) {
86
- define( 'YITH_WCAS', true );
87
- }
88
-
89
- if ( ! defined( 'YITH_WCAS_FILE' ) ) {
90
- define( 'YITH_WCAS_FILE', __FILE__ );
91
- }
92
-
93
- if ( ! defined( 'YITH_WCAS_URL' ) ) {
94
- define( 'YITH_WCAS_URL', plugin_dir_url( __FILE__ ) );
95
- }
96
-
97
- if ( ! defined( 'YITH_WCAS_TEMPLATE_PATH' ) ) {
98
- define( 'YITH_WCAS_TEMPLATE_PATH', YITH_WCAS_DIR . 'templates' );
99
- }
100
-
101
- if ( ! defined( 'YITH_WCAS_ASSETS_URL' ) ) {
102
- define( 'YITH_WCAS_ASSETS_URL', YITH_WCAS_URL . 'assets' );
103
- }
104
-
105
- if ( ! defined( 'YITH_WCAS_ASSETS_IMAGES_URL' ) ) {
106
- define( 'YITH_WCAS_ASSETS_IMAGES_URL', YITH_WCAS_ASSETS_URL . '/images/' );
107
- }
108
-
109
- if ( ! defined( 'YITH_WCAS_SLUG' ) ) {
110
- define( 'YITH_WCAS_SLUG', 'yith-woocommerce-ajax-search' );
111
- }
112
 
113
  /**
114
  * Start plugin.
3
  * Plugin Name: YITH WooCommerce Ajax Search
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/
5
  * Description: <code><strong>YITH WooCommerce Ajax Search</strong></code> is the plugin that allows you to search for a specific product by inserting a few characters. Thanks to <strong>Ajax Search</strong>, users can quickly find the contents they are interested in without wasting time among site pages. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 1.22.2
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-ajax-search
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Ajax Search
16
+ * @version 1.22.2
17
  */
18
 
19
  /*
71
 
72
  register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
73
 
74
+ ! defined( 'YITH_WCAS_VERSION' ) && define( 'YITH_WCAS_VERSION', '1.22.2' );
75
+ ! defined( 'YITH_WCAS_FREE_INIT' ) && define( 'YITH_WCAS_FREE_INIT', plugin_basename( __FILE__ ) );
76
+ ! defined( 'YITH_WCAS' ) && define( 'YITH_WCAS', true );
77
+ ! defined( 'YITH_WCAS_FILE' ) && define( 'YITH_WCAS_FILE', __FILE__ );
78
+ ! defined( 'YITH_WCAS_URL' ) && define( 'YITH_WCAS_URL', plugin_dir_url( __FILE__ ) );
79
+ ! defined( 'YITH_WCAS_TEMPLATE_PATH' ) && define( 'YITH_WCAS_TEMPLATE_PATH', YITH_WCAS_DIR . 'templates' );
80
+ ! defined( 'YITH_WCAS_ASSETS_URL' ) && define( 'YITH_WCAS_ASSETS_URL', YITH_WCAS_URL . 'assets' );
81
+ ! defined( 'YITH_WCAS_ASSETS_IMAGES_URL' ) && define( 'YITH_WCAS_ASSETS_IMAGES_URL', YITH_WCAS_ASSETS_URL . '/images/' );
82
+ ! defined( 'YITH_WCAS_SLUG' ) && define( 'YITH_WCAS_SLUG', 'yith-woocommerce-ajax-search' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
  /**
85
  * Start plugin.
languages/yith-woocommerce-ajax-search.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the YITH WooCommerce Ajax Search package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: YITH WooCommerce Ajax Search 1.22.1\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/yith-woocommerce-ajax-search\n"
8
- "POT-Creation-Date: 2022-08-04 09:34:23+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -14,15 +14,15 @@ msgstr ""
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "X-Generator: grunt-wp-i18n 1.0.3\n"
16
 
17
- #: includes/class.yith-wcas-admin.php:123
18
  msgid "Settings"
19
  msgstr ""
20
 
21
- #: includes/class.yith-wcas-admin.php:124
22
  msgid "Premium Version"
23
  msgstr ""
24
 
25
- #: includes/class.yith-wcas.php:203
26
  msgid "No results"
27
  msgstr ""
28
 
@@ -54,7 +54,7 @@ msgid ""
54
  "you are using the premium one."
55
  msgstr ""
56
 
57
- #: init.php:125
58
  msgid ""
59
  "YITH WooCommerce Ajax Search is enabled but not effective. It requires "
60
  "WooCommerce in order to work."
@@ -220,12 +220,12 @@ msgctxt "[gutenberg]: block description"
220
  msgid "Show Ajax Search Form"
221
  msgstr ""
222
 
223
- #: plugin-options/gutenberg/blocks.php:26
224
  msgctxt "[gutenberg]: keywords"
225
  msgid "Ajax Search"
226
  msgstr ""
227
 
228
- #: plugin-options/gutenberg/blocks.php:27
229
  msgctxt "[gutenberg]: keywords"
230
  msgid "Search"
231
  msgstr ""
2
  # This file is distributed under the same license as the YITH WooCommerce Ajax Search package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: YITH WooCommerce Ajax Search 1.22.2\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/yith-woocommerce-ajax-search\n"
8
+ "POT-Creation-Date: 2022-08-10 09:16:11+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "X-Generator: grunt-wp-i18n 1.0.3\n"
16
 
17
+ #: includes/class.yith-wcas-admin.php:134
18
  msgid "Settings"
19
  msgstr ""
20
 
21
+ #: includes/class.yith-wcas-admin.php:135
22
  msgid "Premium Version"
23
  msgstr ""
24
 
25
+ #: includes/class.yith-wcas.php:231
26
  msgid "No results"
27
  msgstr ""
28
 
54
  "you are using the premium one."
55
  msgstr ""
56
 
57
+ #: init.php:96
58
  msgid ""
59
  "YITH WooCommerce Ajax Search is enabled but not effective. It requires "
60
  "WooCommerce in order to work."
220
  msgid "Show Ajax Search Form"
221
  msgstr ""
222
 
223
+ #: plugin-options/gutenberg/blocks.php:27
224
  msgctxt "[gutenberg]: keywords"
225
  msgid "Ajax Search"
226
  msgstr ""
227
 
228
+ #: plugin-options/gutenberg/blocks.php:28
229
  msgctxt "[gutenberg]: keywords"
230
  msgid "Search"
231
  msgstr ""
plugin-options/gutenberg/blocks.php CHANGED
@@ -7,7 +7,7 @@
7
  * It is also available through the world-wide-web at this URL:
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  *
10
- * @author YITH
11
  * @package YITH WooCommerce Ajax Search
12
  * @version 1.0.0
13
  */
@@ -20,6 +20,7 @@ $blocks = array(
20
  'yith-woocommerce-ajax-search' => array(
21
  'title' => _x( 'Ajax Search', '[gutenberg]: block name', 'yith-woocommerce-ajax-search' ),
22
  'description' => _x( 'Show Ajax Search Form', '[gutenberg]: block description', 'yith-woocommerce-ajax-search' ),
 
23
  'shortcode_name' => 'yith_woocommerce_ajax_search',
24
  'do_shortcode' => true,
25
  'keywords' => array(
@@ -30,6 +31,4 @@ $blocks = array(
30
  );
31
 
32
 
33
-
34
-
35
  return apply_filters( 'ywraq_gutenberg_blocks', $blocks );
7
  * It is also available through the world-wide-web at this URL:
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  *
10
+ * @author YITH
11
  * @package YITH WooCommerce Ajax Search
12
  * @version 1.0.0
13
  */
20
  'yith-woocommerce-ajax-search' => array(
21
  'title' => _x( 'Ajax Search', '[gutenberg]: block name', 'yith-woocommerce-ajax-search' ),
22
  'description' => _x( 'Show Ajax Search Form', '[gutenberg]: block description', 'yith-woocommerce-ajax-search' ),
23
+ 'style' => 'yith_wcas_frontend',
24
  'shortcode_name' => 'yith_woocommerce_ajax_search',
25
  'do_shortcode' => true,
26
  'keywords' => array(
31
  );
32
 
33
 
 
 
34
  return apply_filters( 'ywraq_gutenberg_blocks', $blocks );
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: 5.8
6
  Tested up to: 6.0
7
- Stable tag: 1.22.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -138,6 +138,9 @@ If you have created your own language pack for YITH WooCommerce Ajax Search, or
138
  2. YITH WooCommerce Ajax Search in operation displaying WooCommerce search results
139
 
140
  == Changelog ==
 
 
 
141
  = 1.22.1 - Released on 4 August 2022 =
142
  * Fix: Layout style
143
 
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: 5.8
6
  Tested up to: 6.0
7
+ Stable tag: 1.22.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
138
  2. YITH WooCommerce Ajax Search in operation displaying WooCommerce search results
139
 
140
  == Changelog ==
141
+ = 1.22.2 - Released on 10 August 2022 =
142
+ * Fix: Gutenberg block layout style
143
+
144
  = 1.22.1 - Released on 4 August 2022 =
145
  * Fix: Layout style
146