Advanced Woo Search - Version 1.72

Version Description

  • Fix - Tax search exact matching bug
  • Fix - Empty tax in search results bug
  • Update - Settings page text
Download this release

Release Info

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

Code changes from version 1.71 to 1.72

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.71
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.71' );
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.72
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: aws
16
  exit;
17
  }
18
 
19
+ define( 'AWS_VERSION', '1.72' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
includes/class-aws-search.php CHANGED
@@ -87,6 +87,8 @@ if ( ! class_exists( 'AWS_Search' ) ) :
87
  $s = $keyword ? esc_attr( $keyword ) : esc_attr( $_POST['keyword'] );
88
  $s = htmlspecialchars_decode( $s );
89
 
 
 
90
  $s = AWS_Helpers::normalize_string( $s );
91
 
92
 
@@ -732,6 +734,7 @@ if ( ! class_exists( 'AWS_Search' ) ) :
732
  $search_query = '';
733
 
734
  $filtered_terms = $this->data['search_terms'];
 
735
 
736
  if ( $filtered_terms && ! empty( $filtered_terms ) ) {
737
  foreach ( $filtered_terms as $search_term ) {
@@ -770,9 +773,11 @@ if ( ! class_exists( 'AWS_Search' ) ) :
770
  {$search_query}
771
  AND $wpdb->term_taxonomy.taxonomy = '{$taxonomy}'
772
  AND $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id
 
773
  {$excludes}
774
  LIMIT 0, 10";
775
 
 
776
 
777
  $search_results = $wpdb->get_results( $sql );
778
 
87
  $s = $keyword ? esc_attr( $keyword ) : esc_attr( $_POST['keyword'] );
88
  $s = htmlspecialchars_decode( $s );
89
 
90
+ $this->data['s_nonormalize'] = $s;
91
+
92
  $s = AWS_Helpers::normalize_string( $s );
93
 
94
 
734
  $search_query = '';
735
 
736
  $filtered_terms = $this->data['search_terms'];
737
+ $filtered_terms[] = $this->data['s_nonormalize'];
738
 
739
  if ( $filtered_terms && ! empty( $filtered_terms ) ) {
740
  foreach ( $filtered_terms as $search_term ) {
773
  {$search_query}
774
  AND $wpdb->term_taxonomy.taxonomy = '{$taxonomy}'
775
  AND $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id
776
+ AND count > 0
777
  {$excludes}
778
  LIMIT 0, 10";
779
 
780
+ $sql = trim( preg_replace( '/\s+/', ' ', $sql ) );
781
 
782
  $search_results = $wpdb->get_results( $sql );
783
 
includes/options.php CHANGED
@@ -107,7 +107,7 @@ $options['form'][] = array(
107
 
108
  $options['form'][] = array(
109
  "name" => __( "Nothing found field", "aws" ),
110
- "desc" => __( "Text when there is no search results. HTML tags is allowed.", "aws" ),
111
  "id" => "not_found_text",
112
  "value" => __( "Nothing found", "aws" ),
113
  "type" => "textarea"
107
 
108
  $options['form'][] = array(
109
  "name" => __( "Nothing found field", "aws" ),
110
+ "desc" => __( "Text when there is no search results.", "aws" ),
111
  "id" => "not_found_text",
112
  "value" => __( "Nothing found", "aws" ),
113
  "type" => "textarea"
languages/aws.pot CHANGED
@@ -206,7 +206,7 @@ msgid "Nothing found field"
206
  msgstr ""
207
 
208
  #: includes/options.php:41
209
- msgid "Text when there is no search results. HTML tags is allowed."
210
  msgstr ""
211
 
212
  #: includes/options.php:43
206
  msgstr ""
207
 
208
  #: includes/options.php:41
209
+ msgid "Text when there is no search results."
210
  msgstr ""
211
 
212
  #: includes/options.php:43
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.2
7
- Stable tag: 1.71
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -103,6 +103,11 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
103
 
104
  == Changelog ==
105
 
 
 
 
 
 
106
  = 1.71 =
107
  * Fix - Index table sync for WPML translations
108
 
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.2
7
+ Stable tag: 1.72
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
103
 
104
  == Changelog ==
105
 
106
+ = 1.72 =
107
+ * Fix - Tax search exact matching bug
108
+ * Fix - Empty tax in search results bug
109
+ * Update - Settings page text
110
+
111
  = 1.71 =
112
  * Fix - Index table sync for WPML translations
113