Advanced Woo Search - Version 2.47

Version Description

( 2022-02-07 ) = * Update - Do not close AJAX results block when clicking on results item * Update - Markup for AJAX search results * Update - Styles for admin page welcome message * Update - Support for WooCommerce Product Filter by WooBeWoo * Fix - Bug with admin page scripts loader

Download this release

Release Info

Developer Mihail Barinov
Plugin Icon 128x128 Advanced Woo Search
Version 2.47
Comparing to
See all releases

Code changes from version 2.46 to 2.47

advanced-woo-search.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
- Version: 2.46
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: advanced-woo-search
@@ -96,7 +96,7 @@ final class AWS_Main {
96
  */
97
  private function define_constants() {
98
 
99
- $this->define( 'AWS_VERSION', '2.46' );
100
 
101
  $this->define( 'AWS_DIR', plugin_dir_path( AWS_FILE ) );
102
  $this->define( 'AWS_URL', plugin_dir_url( AWS_FILE ) );
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 2.47
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: advanced-woo-search
96
  */
97
  private function define_constants() {
98
 
99
+ $this->define( 'AWS_VERSION', '2.47' );
100
 
101
  $this->define( 'AWS_DIR', plugin_dir_path( AWS_FILE ) );
102
  $this->define( 'AWS_URL', plugin_dir_url( AWS_FILE ) );
assets/css/admin.css CHANGED
@@ -677,10 +677,94 @@ h1.aws-instance-name {
677
 
678
 
679
  /* Welcome message */
 
 
680
 
681
- .welcome-panel .welcome-panel-column:first-child {
682
- width: 60%;
 
 
 
 
 
 
 
 
683
  }
684
- .welcome-panel .welcome-panel-column {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
685
  width: 20%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
686
  }
677
 
678
 
679
  /* Welcome message */
680
+ .aws-welcome-notice {
681
+ }
682
 
683
+ .aws-welcome-panel {
684
+ border: none;
685
+ box-shadow: none;
686
+ padding: 0;
687
+ margin: 16px 0 0;
688
+ background: transparent;
689
+ font-size: 13px;
690
+ line-height: 1.7;
691
+ position: relative;
692
+ overflow: auto;
693
  }
694
+
695
+ .aws-welcome-panel h2 {
696
+ margin: 0;
697
+ font-size: 21px;
698
+ font-weight: 400;
699
+ line-height: 1.2;
700
+ }
701
+
702
+ .aws-welcome-panel p {
703
+ color: #646970;
704
+ }
705
+
706
+ .aws-welcome-panel .aws-welcome-panel-content {
707
+ margin-left: 13px;
708
+ max-width: 1500px;
709
+ }
710
+
711
+ .aws-welcome-panel .aws-welcome-panel-column-container {
712
+ clear: both;
713
+ position: relative;
714
+ }
715
+
716
+ .aws-welcome-panel .aws-welcome-panel-column:first-child {
717
+ width: 60%;
718
+ }
719
+ .aws-welcome-panel .aws-welcome-panel-column {
720
  width: 20%;
721
+ min-width: 200px;
722
+ float: left;
723
+ }
724
+
725
+ .aws-welcome-panel .aws-welcome-panel-column p {
726
+ margin-top: 7px;
727
+ color: #3c434a;
728
+ }
729
+
730
+ .aws-welcome-panel .about-description {
731
+ font-size: 16px;
732
+ margin: 0;
733
+ }
734
+
735
+ .aws-welcome-panel li {
736
+ font-size: 14px;
737
+ }
738
+
739
+ .aws-welcome-panel li a {
740
+ text-decoration: none;
741
+ padding-bottom: 2px;
742
+ }
743
+
744
+ .aws-welcome-panel .aws-welcome-icon {
745
+ background: 0 0!important;
746
+ }
747
+
748
+ .aws-welcome-panel .aws-welcome-icon:before {
749
+ color: #646970;
750
+ font: normal 20px/1 dashicons;
751
+ speak: never;
752
+ display: inline-block;
753
+ padding: 0 10px 0 0;
754
+ position: relative;
755
+ -webkit-font-smoothing: antialiased;
756
+ -moz-osx-font-smoothing: grayscale;
757
+ text-decoration: none!important;
758
+ vertical-align: top;
759
+ }
760
+
761
+ .aws-welcome-panel .aws-welcome-edit-page:before,
762
+ .aws-welcome-panel .aws-welcome-write-blog:before {
763
+ content: "\f119";
764
+ top: -3px;
765
+ }
766
+
767
+ .aws-welcome-panel .aws-welcome-widgets-menus:before {
768
+ content: "\f116";
769
+ top: -2px;
770
  }
assets/css/common.css CHANGED
@@ -312,6 +312,32 @@
312
  background: #f5f5f5;
313
  }
314
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
 
316
  .aws-search-result .aws_result_content {
317
  overflow: hidden;
312
  background: #f5f5f5;
313
  }
314
 
315
+ .aws-search-result .aws_results .aws_result_item {
316
+ position: relative;
317
+ }
318
+
319
+ .aws-search-result .aws_result_item .aws_result_link_top {
320
+ position: absolute;
321
+ z-index: 1;
322
+ white-space: nowrap;
323
+ text-indent: -9999px;
324
+ overflow: hidden;
325
+ top: 0;
326
+ bottom: 0;
327
+ left: 0;
328
+ right: 0;
329
+ opacity: 0;
330
+ outline: none;
331
+ text-decoration: none;
332
+ }
333
+
334
+ .aws-search-result .aws_result_item a,
335
+ .aws-search-result .aws_result_item button,
336
+ .aws-search-result .aws_result_item span[href],
337
+ .aws-search-result .aws_result_item [data-link] {
338
+ position: relative;
339
+ z-index: 2;
340
+ }
341
 
342
  .aws-search-result .aws_result_content {
343
  overflow: hidden;
assets/js/common.js CHANGED
@@ -168,8 +168,9 @@ AwsHooks.filters = AwsHooks.filters || {};
168
 
169
  resultNum++;
170
 
171
- html += '<li class="aws_result_item aws_result_tag">';
172
- html += '<a class="aws_result_link" href="' + taxitem.link + '" >';
 
173
  html += '<span class="aws_result_content">';
174
  html += '<span class="aws_result_title">';
175
  html += taxitem.name;
@@ -181,7 +182,7 @@ AwsHooks.filters = AwsHooks.filters || {};
181
  html += '<span class="aws_result_excerpt">' + taxitem.excerpt + '</span>';
182
  }
183
  html += '</span>';
184
- html += '</a>';
185
  html += '</li>';
186
 
187
  });
@@ -197,8 +198,10 @@ AwsHooks.filters = AwsHooks.filters || {};
197
 
198
  resultNum++;
199
 
200
- html += '<li class="aws_result_item">';
201
- html += '<a class="aws_result_link" href="' + result.link + '" >';
 
 
202
 
203
  if ( result.image ) {
204
  html += '<span class="aws_result_image">';
@@ -242,7 +245,7 @@ AwsHooks.filters = AwsHooks.filters || {};
242
  html += '</span>';
243
  }
244
 
245
- html += '</a>';
246
  html += '</li>';
247
 
248
  });
@@ -316,7 +319,10 @@ AwsHooks.filters = AwsHooks.filters || {};
316
  },
317
 
318
  hideResults: function( event ) {
319
- if ( ! $(event.target).closest( ".aws-container" ).length ) {
 
 
 
320
  methods.resultsHide();
321
  }
322
  },
168
 
169
  resultNum++;
170
 
171
+ html += '<li class="aws_result_item aws_result_tag" style="position:relative;">';
172
+ html += '<div class="aws_result_link">';
173
+ html += '<a class="aws_result_link_top" style="position:absolute;z-index:1;white-space:nowrap;text-indent:-9999px;overflow:hidden;top:0;bottom:0;left:0;right:0;opacity:0;outline:none;text-decoration:none;" href="' + taxitem.link + '">' + taxitem.name + '</a>';
174
  html += '<span class="aws_result_content">';
175
  html += '<span class="aws_result_title">';
176
  html += taxitem.name;
182
  html += '<span class="aws_result_excerpt">' + taxitem.excerpt + '</span>';
183
  }
184
  html += '</span>';
185
+ html += '</div>';
186
  html += '</li>';
187
 
188
  });
198
 
199
  resultNum++;
200
 
201
+ html += '<li class="aws_result_item" style="position:relative;">';
202
+ html += '<div class="aws_result_link">';
203
+
204
+ html += '<a class="aws_result_link_top" style="position:absolute;z-index:1;white-space:nowrap;text-indent:-9999px;overflow:hidden;top:0;bottom:0;left:0;right:0;opacity:0;outline:none;text-decoration:none;" href="' + result.link + '">' + result.title.replace(/<(?:.|\n)*?>/gm, '') + '</a>';
205
 
206
  if ( result.image ) {
207
  html += '<span class="aws_result_image">';
245
  html += '</span>';
246
  }
247
 
248
+ html += '</div>';
249
  html += '</li>';
250
 
251
  });
319
  },
320
 
321
  hideResults: function( event ) {
322
+ if ( ! $(event.target).closest( ".aws-container" ).length
323
+ && ! $(event.target).closest( self ).length
324
+ && ! $(event.target).closest( d.resultBlock ).length
325
+ ) {
326
  methods.resultsHide();
327
  }
328
  },
includes/admin/class-aws-admin-meta-boxes.php CHANGED
@@ -72,12 +72,12 @@ if ( ! class_exists( 'AWS_Admin_Meta_Boxes' ) ) :
72
  $html .= '<div id="aws-welcome-panel">';
73
  $html .= '<div class="aws-welcome-notice updated notice is-dismissible" style="background:#f2fbff;">';
74
 
75
- $html .= '<div class="welcome-panel" style="border:none;box-shadow:none;padding:0;margin:16px 0 0;background:transparent;">';
76
- $html .= '<div class="welcome-panel-content">';
77
  $html .= '<h2>' . sprintf( __( 'Welcome to %s', 'advanced-woo-search' ), 'Advanced Woo Search' ) . '</h2>';
78
  $html .= '<p class="about-description">' . __( 'Powerful search plugin for WooCommerce.', 'advanced-woo-search' ) . '</p>';
79
- $html .= '<div class="welcome-panel-column-container">';
80
- $html .= '<div class="welcome-panel-column">';
81
  $html .= '<h4>' . __( 'Get Started', 'advanced-woo-search' ) . '</h4>';
82
  $html .= '<p style="margin-bottom:10px;">' . __( 'In order to start using the plugin search form you need to take following steps:', 'advanced-woo-search' ) . '</p>';
83
  $html .= '<ul>';
@@ -87,20 +87,20 @@ if ( ! class_exists( 'AWS_Admin_Meta_Boxes' ) ) :
87
  $html .= '<li><strong>4.</strong> <strong>' . __( 'Finish!', 'advanced-woo-search' ) . '</strong> ' . __( 'Now all is set and you can check your search form on the pages where you add it.', 'advanced-woo-search' ) . '</li>';
88
  $html .= '</ul>';
89
  $html .= '</div>';
90
- $html .= '<div class="welcome-panel-column">';
91
  $html .= '<h4>' . __( 'Documentation', 'advanced-woo-search' ) . '</h4>';
92
  $html .= '<ul>';
93
- $html .= '<li><a href="https://advanced-woo-search.com/guide/steps-to-get-started/" class="welcome-icon welcome-edit-page" target="_blank">' . __( 'Steps to Get Started', 'advanced-woo-search' ) . '</a></li>';
94
- $html .= '<li><a href="https://advanced-woo-search.com/guide/search-form/" class="welcome-icon welcome-edit-page" target="_blank">' . __( 'How to Add Search Form', 'advanced-woo-search' ) . '</a></li>';
95
- $html .= '<li><a href="https://advanced-woo-search.com/guide/search-source/" class="welcome-icon welcome-edit-page" target="_blank">' . __( 'Search Sources', 'advanced-woo-search' ) . '</a></li>';
96
- $html .= '<li><a href="https://advanced-woo-search.com/guide/terms-search/" class="welcome-icon welcome-edit-page" target="_blank">' . __( 'Terms Pages Search', 'advanced-woo-search' ) . '</a></li>';
97
  $html .= '</ul>';
98
  $html .= '</div>';
99
- $html .= '<div class="welcome-panel-column welcome-panel-last">';
100
  $html .= '<h4>' . __( 'Help', 'advanced-woo-search' ) . '</h4>';
101
  $html .= '<ul>';
102
- $html .= '<li><div class="welcome-icon welcome-widgets-menus"><a href="https://wordpress.org/support/plugin/advanced-woo-search/" target="_blank">' . __( 'Support Forums', 'advanced-woo-search' ) . '</a></div></li>';
103
- $html .= '<li><div class="welcome-icon welcome-widgets-menus"><a href="https://advanced-woo-search.com/contact/" target="_blank">' . __( 'Contact Form', 'advanced-woo-search' ) . '</a></div></li>';
104
  $html .= '</ul>';
105
  $html .= '</div>';
106
  $html .= '</div>';
72
  $html .= '<div id="aws-welcome-panel">';
73
  $html .= '<div class="aws-welcome-notice updated notice is-dismissible" style="background:#f2fbff;">';
74
 
75
+ $html .= '<div class="aws-welcome-panel" style="border:none;box-shadow:none;padding:0;margin:16px 0 0;background:transparent;">';
76
+ $html .= '<div class="aws-welcome-panel-content">';
77
  $html .= '<h2>' . sprintf( __( 'Welcome to %s', 'advanced-woo-search' ), 'Advanced Woo Search' ) . '</h2>';
78
  $html .= '<p class="about-description">' . __( 'Powerful search plugin for WooCommerce.', 'advanced-woo-search' ) . '</p>';
79
+ $html .= '<div class="aws-welcome-panel-column-container">';
80
+ $html .= '<div class="aws-welcome-panel-column">';
81
  $html .= '<h4>' . __( 'Get Started', 'advanced-woo-search' ) . '</h4>';
82
  $html .= '<p style="margin-bottom:10px;">' . __( 'In order to start using the plugin search form you need to take following steps:', 'advanced-woo-search' ) . '</p>';
83
  $html .= '<ul>';
87
  $html .= '<li><strong>4.</strong> <strong>' . __( 'Finish!', 'advanced-woo-search' ) . '</strong> ' . __( 'Now all is set and you can check your search form on the pages where you add it.', 'advanced-woo-search' ) . '</li>';
88
  $html .= '</ul>';
89
  $html .= '</div>';
90
+ $html .= '<div class="aws-welcome-panel-column">';
91
  $html .= '<h4>' . __( 'Documentation', 'advanced-woo-search' ) . '</h4>';
92
  $html .= '<ul>';
93
+ $html .= '<li><a href="https://advanced-woo-search.com/guide/steps-to-get-started/" class="aws-welcome-icon aws-welcome-edit-page" target="_blank">' . __( 'Steps to Get Started', 'advanced-woo-search' ) . '</a></li>';
94
+ $html .= '<li><a href="https://advanced-woo-search.com/guide/search-form/" class="aws-welcome-icon aws-welcome-edit-page" target="_blank">' . __( 'How to Add Search Form', 'advanced-woo-search' ) . '</a></li>';
95
+ $html .= '<li><a href="https://advanced-woo-search.com/guide/search-source/" class="aws-welcome-icon aws-welcome-edit-page" target="_blank">' . __( 'Search Sources', 'advanced-woo-search' ) . '</a></li>';
96
+ $html .= '<li><a href="https://advanced-woo-search.com/guide/terms-search/" class="aws-welcome-icon aws-welcome-edit-page" target="_blank">' . __( 'Terms Pages Search', 'advanced-woo-search' ) . '</a></li>';
97
  $html .= '</ul>';
98
  $html .= '</div>';
99
+ $html .= '<div class="aws-welcome-panel-column aws-welcome-panel-last">';
100
  $html .= '<h4>' . __( 'Help', 'advanced-woo-search' ) . '</h4>';
101
  $html .= '<ul>';
102
+ $html .= '<li><div class="aws-welcome-icon aws-welcome-widgets-menus"><a href="https://wordpress.org/support/plugin/advanced-woo-search/" target="_blank">' . __( 'Support Forums', 'advanced-woo-search' ) . '</a></div></li>';
103
+ $html .= '<li><div class="aws-welcome-icon aws-welcome-widgets-menus"><a href="https://advanced-woo-search.com/contact/" target="_blank">' . __( 'Contact Form', 'advanced-woo-search' ) . '</a></div></li>';
104
  $html .= '</ul>';
105
  $html .= '</div>';
106
  $html .= '</div>';
includes/admin/class-aws-admin.php CHANGED
@@ -165,7 +165,7 @@ class AWS_Admin {
165
  wp_enqueue_style( 'plugin-admin-style', AWS_URL . 'assets/css/admin.css', array(), AWS_VERSION );
166
  wp_enqueue_script( 'jquery' );
167
  wp_enqueue_script( 'jquery-ui-sortable' );
168
- wp_enqueue_script( 'plugin-admin-scripts', AWS_URL . 'assets/js/admin.js', array('jquery'), AWS_VERSION );
169
  wp_localize_script( 'plugin-admin-scripts', 'aws_vars', array(
170
  'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ),
171
  'ajax_nonce' => wp_create_nonce( 'aws_admin_ajax_nonce' ),
165
  wp_enqueue_style( 'plugin-admin-style', AWS_URL . 'assets/css/admin.css', array(), AWS_VERSION );
166
  wp_enqueue_script( 'jquery' );
167
  wp_enqueue_script( 'jquery-ui-sortable' );
168
+ wp_enqueue_script( 'plugin-admin-scripts', AWS_URL . 'assets/js/admin.js', array('jquery', 'jquery-ui-sortable'), AWS_VERSION );
169
  wp_localize_script( 'plugin-admin-scripts', 'aws_vars', array(
170
  'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ),
171
  'ajax_nonce' => wp_create_nonce( 'aws_admin_ajax_nonce' ),
includes/modules/class-aws-woobewoo-filters.php CHANGED
@@ -112,9 +112,36 @@ if (!class_exists('AWS_Woobewoo_Filters')) :
112
  elseif ( strpos( $key, 'pr_onsale' ) !== false ) {
113
  $filters['on_sale'] = true;
114
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  elseif ( strpos( $key, 'filter_' ) === 0 ) {
116
 
117
- $taxonomy = str_replace( 'filter_', '', $key );
 
 
 
 
 
118
  if ( preg_match( '/([a-z]+?)_[\d]/', $taxonomy, $matches ) ) {
119
  $taxonomy = $matches[1];
120
  }
112
  elseif ( strpos( $key, 'pr_onsale' ) !== false ) {
113
  $filters['on_sale'] = true;
114
  }
115
+ elseif ( strpos( $key, 'pr_stock' ) !== false ) {
116
+ $filters['in_status'] = $param === 'instock';
117
+ }
118
+ elseif ( strpos( $key, 'pr_rating' ) !== false ) {
119
+ switch ( $param ) {
120
+ case '1-5':
121
+ $rating = array( 1, 2, 3, 4, 5 );
122
+ break;
123
+ case '2-5':
124
+ $rating = array( 2, 3, 4, 5 );
125
+ break;
126
+ case '3-5':
127
+ $rating = array( 3, 4, 5 );
128
+ break;
129
+ case '4-5':
130
+ $rating = array( 4, 5 );
131
+ break;
132
+ default:
133
+ $rating = array( 5 );
134
+ }
135
+ $filters['rating'] = $rating;
136
+ }
137
  elseif ( strpos( $key, 'filter_' ) === 0 ) {
138
 
139
+ if ( strpos( $key, 'filter_pwb_' ) === 0 ) {
140
+ $taxonomy = 'pwb-brand';
141
+ } else {
142
+ $taxonomy = str_replace( 'filter_', '', $key );
143
+ }
144
+
145
  if ( preg_match( '/([a-z]+?)_[\d]/', $taxonomy, $matches ) ) {
146
  $taxonomy = $matches[1];
147
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: widget, plugin, woocommerce, search, product search, woocommerce search, ajax search, live search, custom search, ajax, shortcode, better search, relevance search, relevant search, search by sku, search plugin, shop, store, wordpress search, wp ajax search, wp search, wp search plugin, sidebar, ecommerce, merketing, products, category search, instant-search, search highlight, woocommerce advanced search, woocommerce live search, WooCommerce Plugin, woocommerce product search
5
  Requires at least: 4.0
6
  Tested up to: 5.9
7
- Stable tag: 2.46
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -167,7 +167,14 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
167
 
168
  == Changelog ==
169
 
170
- = 2.45 ( 2022-01-26 ) =
 
 
 
 
 
 
 
171
  * Update - Divi builder support. Index content from long description fields
172
  * Fix - Bug with Divi visual builder that trigger error on save
173
 
4
  Tags: widget, plugin, woocommerce, search, product search, woocommerce search, ajax search, live search, custom search, ajax, shortcode, better search, relevance search, relevant search, search by sku, search plugin, shop, store, wordpress search, wp ajax search, wp search, wp search plugin, sidebar, ecommerce, merketing, products, category search, instant-search, search highlight, woocommerce advanced search, woocommerce live search, WooCommerce Plugin, woocommerce product search
5
  Requires at least: 4.0
6
  Tested up to: 5.9
7
+ Stable tag: 2.47
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
167
 
168
  == Changelog ==
169
 
170
+ = 2.47 ( 2022-02-07 ) =
171
+ * Update - Do not close AJAX results block when clicking on results item
172
+ * Update - Markup for AJAX search results
173
+ * Update - Styles for admin page welcome message
174
+ * Update - Support for WooCommerce Product Filter by WooBeWoo
175
+ * Fix - Bug with admin page scripts loader
176
+
177
+ = 2.46 ( 2022-01-26 ) =
178
  * Update - Divi builder support. Index content from long description fields
179
  * Fix - Bug with Divi visual builder that trigger error on save
180