Advanced Woo Search - Version 1.57

Version Description

  • Update search query string
  • Fix style for search icon
  • Fix search field style
  • Fix clear button style
Download this release

Release Info

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

Code changes from version 1.56 to 1.57

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: 1.56
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: aws
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
17
  }
18
 
19
- define( 'AWS_VERSION', '1.56' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 1.57
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: aws
16
  exit;
17
  }
18
 
19
+ define( 'AWS_VERSION', '1.57' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
assets/css/common.css CHANGED
@@ -88,6 +88,7 @@
88
 
89
  .aws-container .aws-search-field {
90
  width: 100%;
 
91
  color: #313131;
92
  padding: 6px;
93
  line-height: 30px;
@@ -132,6 +133,7 @@
132
  height: 100%;
133
  width: 38px;
134
  padding-left: 10px;
 
135
  }
136
  .aws-container .aws-search-form .aws-search-clear span {
137
  position: relative;
88
 
89
  .aws-container .aws-search-field {
90
  width: 100%;
91
+ max-width: 100%;
92
  color: #313131;
93
  padding: 6px;
94
  line-height: 30px;
133
  height: 100%;
134
  width: 38px;
135
  padding-left: 10px;
136
+ text-align: left;
137
  }
138
  .aws-container .aws-search-form .aws-search-clear span {
139
  position: relative;
includes/class-aws-markup.php CHANGED
@@ -96,7 +96,7 @@ if ( ! class_exists( 'AWS_Markup' ) ) :
96
 
97
  $markup .= '<div class="aws-search-btn aws-form-btn">';
98
  $markup .= '<span class="aws-search-btn_icon">';
99
- $markup .= '<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">';
100
  $markup .= '<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>';
101
  $markup .= '</svg>';
102
  $markup .= '</span>';
96
 
97
  $markup .= '<div class="aws-search-btn aws-form-btn">';
98
  $markup .= '<span class="aws-search-btn_icon">';
99
+ $markup .= '<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24px">';
100
  $markup .= '<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>';
101
  $markup .= '</svg>';
102
  $markup .= '</span>';
includes/class-aws-search.php CHANGED
@@ -343,18 +343,18 @@ if ( ! class_exists( 'AWS_Search' ) ) :
343
  $source_array[] = "term_source = '{$search_in_term}'";
344
  }
345
 
346
- $query['relevance'] .= sprintf( ' (SUM( %s )) ', implode( ' + ', $new_relevance_array ) );
347
- $query['search'] .= sprintf( ' AND ( %s )', implode( ' OR ', $search_array ) );
348
- $query['source'] .= sprintf( ' AND ( %s )', implode( ' OR ', $source_array ) );
349
 
350
 
351
  if ( $reindex_version && version_compare( $reindex_version, '1.16', '>=' ) ) {
352
 
353
  if ( $outofstock !== 'true' ) {
354
- $query['stock'] .= " AND in_stock = 1";
355
  }
356
 
357
- $query['visibility'] .= " AND NOT visibility LIKE '%hidden%'";
358
 
359
  }
360
 
@@ -366,7 +366,7 @@ if ( ! class_exists( 'AWS_Search' ) ) :
366
  }
367
 
368
  if ( $current_lang && $reindex_version && version_compare( $reindex_version, '1.20', '>=' ) ) {
369
- $query['lang'] .= $wpdb->prepare( " AND ( lang LIKE %s OR lang = '' )", $current_lang );
370
  }
371
 
372
 
343
  $source_array[] = "term_source = '{$search_in_term}'";
344
  }
345
 
346
+ $query['relevance'] = sprintf( ' (SUM( %s )) ', implode( ' + ', $new_relevance_array ) );
347
+ $query['search'] = sprintf( ' AND ( %s )', implode( ' OR ', $search_array ) );
348
+ $query['source'] = sprintf( ' AND ( %s )', implode( ' OR ', $source_array ) );
349
 
350
 
351
  if ( $reindex_version && version_compare( $reindex_version, '1.16', '>=' ) ) {
352
 
353
  if ( $outofstock !== 'true' ) {
354
+ $query['stock'] = " AND in_stock = 1";
355
  }
356
 
357
+ $query['visibility'] = " AND NOT visibility LIKE '%hidden%'";
358
 
359
  }
360
 
366
  }
367
 
368
  if ( $current_lang && $reindex_version && version_compare( $reindex_version, '1.20', '>=' ) ) {
369
+ $query['lang'] = $wpdb->prepare( " AND ( lang LIKE %s OR lang = '' )", $current_lang );
370
  }
371
 
372
 
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.0
7
- Stable tag: 1.56
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -101,6 +101,12 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
101
 
102
  == Changelog ==
103
 
 
 
 
 
 
 
104
  = 1.56 =
105
  * Update stopwords list
106
  * Add search box layout options
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.0
7
+ Stable tag: 1.57
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
101
 
102
  == Changelog ==
103
 
104
+ = 1.57 =
105
+ * Update search query string
106
+ * Fix style for search icon
107
+ * Fix search field style
108
+ * Fix clear button style
109
+
110
  = 1.56 =
111
  * Update stopwords list
112
  * Add search box layout options