Advanced Woo Search - Version 1.99

Version Description

  • Update - OceanWp theme integration
  • Fix - Bug with product short description search
  • Fix - SKU string translation
  • Dev - Add aws_reindex_product action to re-index single product by its ID
Download this release

Release Info

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

Code changes from version 1.98 to 1.99

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.98
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: advanced-woo-search
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
17
  }
18
 
19
- define( 'AWS_VERSION', '1.98' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
@@ -163,7 +163,7 @@ final class AWS_Main {
163
  wp_enqueue_script('aws-script', AWS_URL . '/assets/js/common.js', array('jquery'), AWS_VERSION, true);
164
  wp_localize_script('aws-script', 'aws_vars', array(
165
  'sale' => __('Sale!', 'advanced-woo-search'),
166
- 'sku' => __('SKU', 'advanced-woo-search'),
167
  'showmore' => $this->get_settings('show_more_text') ? AWS_Helpers::translate( 'show_more_text', stripslashes( $this->get_settings('show_more_text') ) ) : __('View all results', 'advanced-woo-search'),
168
  'noresults' => $this->get_settings('not_found_text') ? AWS_Helpers::translate( 'not_found_text', stripslashes( $this->get_settings('not_found_text') ) ) : __('Nothing found', 'advanced-woo-search'),
169
  ));
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 1.99
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: advanced-woo-search
16
  exit;
17
  }
18
 
19
+ define( 'AWS_VERSION', '1.99' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
163
  wp_enqueue_script('aws-script', AWS_URL . '/assets/js/common.js', array('jquery'), AWS_VERSION, true);
164
  wp_localize_script('aws-script', 'aws_vars', array(
165
  'sale' => __('Sale!', 'advanced-woo-search'),
166
+ 'sku' => __('SKU', 'advanced-woo-search') . ': ',
167
  'showmore' => $this->get_settings('show_more_text') ? AWS_Helpers::translate( 'show_more_text', stripslashes( $this->get_settings('show_more_text') ) ) : __('View all results', 'advanced-woo-search'),
168
  'noresults' => $this->get_settings('not_found_text') ? AWS_Helpers::translate( 'not_found_text', stripslashes( $this->get_settings('not_found_text') ) ) : __('Nothing found', 'advanced-woo-search'),
169
  ));
assets/js/common.js CHANGED
@@ -175,7 +175,7 @@
175
  }
176
 
177
  if ( result.sku ) {
178
- html += '<span class="aws_result_sku">' + translate.sku + ': ' + result.sku + '</span>';
179
  }
180
 
181
  if ( result.excerpt ) {
175
  }
176
 
177
  if ( result.sku ) {
178
+ html += '<span class="aws_result_sku">' + translate.sku + result.sku + '</span>';
179
  }
180
 
181
  if ( result.excerpt ) {
includes/class-aws-integrations.php CHANGED
@@ -718,6 +718,7 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
718
  $selectors[] = '#searchform-header-replace form';
719
  $selectors[] = '#searchform-overlay form';
720
  $selectors[] = '#sidr .sidr-class-mobile-searchform';
 
721
  }
722
 
723
  return $selectors;
718
  $selectors[] = '#searchform-header-replace form';
719
  $selectors[] = '#searchform-overlay form';
720
  $selectors[] = '#sidr .sidr-class-mobile-searchform';
721
+ $selectors[] = '#mobile-menu-search form';
722
  }
723
 
724
  return $selectors;
includes/class-aws-search.php CHANGED
@@ -321,8 +321,8 @@ if ( ! class_exists( 'AWS_Search' ) ) :
321
  break;
322
 
323
  case 'excerpt':
324
- $relevance_array['content'][] = $wpdb->prepare( "( case when ( term_source = 'excerpt' AND term = '%s' ) then {$relevance_content} * count else 0 end )", $search_term );
325
- $relevance_array['content'][] = $wpdb->prepare( "( case when ( term_source = 'excerpt' AND term LIKE %s ) then {$relevance_content_like} * count else 0 end )", $like );
326
  break;
327
 
328
  case 'category':
321
  break;
322
 
323
  case 'excerpt':
324
+ $relevance_array['excerpt'][] = $wpdb->prepare( "( case when ( term_source = 'excerpt' AND term = '%s' ) then {$relevance_content} * count else 0 end )", $search_term );
325
+ $relevance_array['excerpt'][] = $wpdb->prepare( "( case when ( term_source = 'excerpt' AND term LIKE %s ) then {$relevance_content_like} * count else 0 end )", $like );
326
  break;
327
 
328
  case 'category':
includes/class-aws-table.php CHANGED
@@ -52,6 +52,8 @@ if ( ! class_exists( 'AWS_Table' ) ) :
52
 
53
  add_action( 'aws_reindex_table', array( $this, 'reindex_table_job' ) );
54
 
 
 
55
  }
56
 
57
  /*
@@ -773,6 +775,13 @@ if ( ! class_exists( 'AWS_Table' ) ) :
773
 
774
  }
775
 
 
 
 
 
 
 
 
776
  /*
777
  * Update index table
778
  */
52
 
53
  add_action( 'aws_reindex_table', array( $this, 'reindex_table_job' ) );
54
 
55
+ add_action( 'aws_reindex_product', array( $this, 'reindex_product_action' ) );
56
+
57
  }
58
 
59
  /*
775
 
776
  }
777
 
778
+ /*
779
+ * Re-index single product action
780
+ */
781
+ public function reindex_product_action( $product_id ) {
782
+ $this->update_table( $product_id );
783
+ }
784
+
785
  /*
786
  * Update index table
787
  */
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.4
7
- Stable tag: 1.98
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -104,6 +104,12 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
104
 
105
  == Changelog ==
106
 
 
 
 
 
 
 
107
  = 1.98 =
108
  * Update - Add SQL query inside responce
109
  * Update - Seamless integration JS method
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.4
7
+ Stable tag: 1.99
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
104
 
105
  == Changelog ==
106
 
107
+ = 1.99 =
108
+ * Update - OceanWp theme integration
109
+ * Fix - Bug with product short description search
110
+ * Fix - SKU string translation
111
+ * Dev - Add aws_reindex_product action to re-index single product by its ID
112
+
113
  = 1.98 =
114
  * Update - Add SQL query inside responce
115
  * Update - Seamless integration JS method