Advanced Woo Search - Version 1.14

Version Description

  • Fix number of search results on search page
  • Exclude draft products from search
  • Fix bugs
Download this release

Release Info

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

Code changes from version 1.13 to 1.14

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.13
7
  Author: ILLID
8
  Text Domain: aws
9
  */
@@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  exit;
14
  }
15
 
16
- define( 'AWS_VERSION', '1.13' );
17
 
18
 
19
  define( 'AWS_DIR', dirname( __FILE__ ) );
@@ -112,7 +112,7 @@ final class AWS_Main {
112
  wp_enqueue_script( 'aws-script', AWS_URL . '/assets/js/common.js', array('jquery'), AWS_VERSION, true );
113
  wp_localize_script( 'aws-script', 'aws_vars', array(
114
  'sale' => __( 'Sale!', 'aws' ),
115
- 'noresults' => __( 'Nothing found', 'aws' )
116
  ) );
117
  }
118
 
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 1.14
7
  Author: ILLID
8
  Text Domain: aws
9
  */
13
  exit;
14
  }
15
 
16
+ define( 'AWS_VERSION', '1.14' );
17
 
18
 
19
  define( 'AWS_DIR', dirname( __FILE__ ) );
112
  wp_enqueue_script( 'aws-script', AWS_URL . '/assets/js/common.js', array('jquery'), AWS_VERSION, true );
113
  wp_localize_script( 'aws-script', 'aws_vars', array(
114
  'sale' => __( 'Sale!', 'aws' ),
115
+ 'noresults' => $this->get_settings( 'not_found_text' ) ? $this->get_settings( 'not_found_text' ) : __( 'Nothing found', 'aws' )
116
  ) );
117
  }
118
 
includes/class-aws-admin.php CHANGED
@@ -152,7 +152,7 @@ class AWS_Admin {
152
  <tr valign="top">
153
  <th scope="row"><?php echo $value['name']; ?></th>
154
  <td>
155
- <input type="text" name="<?php echo $value['id']; ?>" class="regular-text" value="<?php echo stripslashes( $plugin_options[ $value['id'] ] ); ?>">
156
  <br><span class="description"><?php echo $value['desc']; ?></span>
157
  </td>
158
  </tr>
152
  <tr valign="top">
153
  <th scope="row"><?php echo $value['name']; ?></th>
154
  <td>
155
+ <input type="text" name="<?php echo $value['id']; ?>" class="regular-text" value="<?php echo isset( $plugin_options[ $value['id'] ] ) ? stripslashes( $plugin_options[ $value['id'] ] ) : ''; ?>">
156
  <br><span class="description"><?php echo $value['desc']; ?></span>
157
  </td>
158
  </tr>
includes/class-aws-search.php CHANGED
@@ -75,7 +75,7 @@ if ( ! class_exists( 'AWS_Search' ) ) :
75
 
76
  $show_cats = AWS()->get_settings( 'show_cats' );
77
  $show_tags = AWS()->get_settings( 'show_tags' );
78
- $results_num = AWS()->get_settings( 'results_num' );
79
  $search_in = AWS()->get_settings( 'search_in' );
80
 
81
  $search_in_arr = explode( ',', AWS()->get_settings( 'search_in' ) );
75
 
76
  $show_cats = AWS()->get_settings( 'show_cats' );
77
  $show_tags = AWS()->get_settings( 'show_tags' );
78
+ $results_num = $keyword ? 100 : AWS()->get_settings( 'results_num' );
79
  $search_in = AWS()->get_settings( 'search_in' );
80
 
81
  $search_in_arr = explode( ',', AWS()->get_settings( 'search_in' ) );
includes/class-aws-table.php CHANGED
@@ -84,6 +84,7 @@ if ( ! class_exists( 'AWS_Table' ) ) :
84
  'posts_per_page' => $posts_per_page,
85
  'fields' => 'ids',
86
  'post_type' => 'product',
 
87
  'offset' => $index_meta['offset'],
88
  'ignore_sticky_posts' => true,
89
  'orderby' => 'ID',
@@ -309,6 +310,7 @@ if ( ! class_exists( 'AWS_Table' ) ) :
309
  'posts_per_page' => -1,
310
  'fields' => 'ids',
311
  'post_type' => 'product',
 
312
  'no_found_rows' => 1,
313
  'include' => $post_id
314
  ) );
@@ -347,6 +349,7 @@ if ( ! class_exists( 'AWS_Table' ) ) :
347
  'posts_per_page' => -1,
348
  'fields' => 'ids',
349
  'post_type' => 'product',
 
350
  'no_found_rows' => 1,
351
  'include' => $product_id
352
  ) );
84
  'posts_per_page' => $posts_per_page,
85
  'fields' => 'ids',
86
  'post_type' => 'product',
87
+ 'post_status' => 'publish',
88
  'offset' => $index_meta['offset'],
89
  'ignore_sticky_posts' => true,
90
  'orderby' => 'ID',
310
  'posts_per_page' => -1,
311
  'fields' => 'ids',
312
  'post_type' => 'product',
313
+ 'post_status' => 'publish',
314
  'no_found_rows' => 1,
315
  'include' => $post_id
316
  ) );
349
  'posts_per_page' => -1,
350
  'fields' => 'ids',
351
  'post_type' => 'product',
352
+ 'post_status' => 'publish',
353
  'no_found_rows' => 1,
354
  'include' => $product_id
355
  ) );
includes/options.php CHANGED
@@ -32,7 +32,15 @@ $options['form'][] = array(
32
  "name" => __( "Text for search field", "aws" ),
33
  "desc" => __( "Text for search field placeholder.", "aws" ),
34
  "id" => "search_field_text",
35
- "value" => "Search",
 
 
 
 
 
 
 
 
36
  "type" => "text"
37
  );
38
 
32
  "name" => __( "Text for search field", "aws" ),
33
  "desc" => __( "Text for search field placeholder.", "aws" ),
34
  "id" => "search_field_text",
35
+ "value" => __( "Search", "aws" ),
36
+ "type" => "text"
37
+ );
38
+
39
+ $options['form'][] = array(
40
+ "name" => __( "Nothing found text", "aws" ),
41
+ "desc" => __( "Text when there is no search results.", "aws" ),
42
+ "id" => "not_found_text",
43
+ "value" => __( "Nothing found", "aws" ),
44
  "type" => "text"
45
  );
46
 
languages/aws.pot CHANGED
@@ -58,10 +58,6 @@ msgstr ""
58
  msgid "Sale!"
59
  msgstr ""
60
 
61
- #: advanced-woo-search.php:114
62
- msgid "Nothing found"
63
- msgstr ""
64
-
65
  #: advanced-woo-search.php:127
66
  msgid "Settings"
67
  msgstr ""
@@ -147,6 +143,22 @@ msgstr ""
147
  msgid "Text for search field placeholder."
148
  msgstr ""
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  #: includes/options.php:29
151
  msgid "Minimum number of characters"
152
  msgstr ""
58
  msgid "Sale!"
59
  msgstr ""
60
 
 
 
 
 
61
  #: advanced-woo-search.php:127
62
  msgid "Settings"
63
  msgstr ""
143
  msgid "Text for search field placeholder."
144
  msgstr ""
145
 
146
+ #: includes/options.php:35
147
+ msgid "Search"
148
+ msgstr ""
149
+
150
+ #: includes/options.php:40
151
+ msgid "Nothing found text"
152
+ msgstr ""
153
+
154
+ #: includes/options.php:41
155
+ msgid "Text when there is no search results."
156
+ msgstr ""
157
+
158
+ #: includes/options.php:43
159
+ msgid "Nothing found"
160
+ msgstr ""
161
+
162
  #: includes/options.php:29
163
  msgid "Minimum number of characters"
164
  msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Mihail Barinov
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GSE37FC4Y7CEY
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: 4.7.2
7
- Stable tag: 1.13
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,6 +59,10 @@ Or insert this function inside php file ( often it used to insert form inside pa
59
 
60
  `echo do_shortcode( '[aws_search_form]' );`
61
 
 
 
 
 
62
  == Screenshots ==
63
 
64
  1. Front-end view
@@ -66,6 +70,11 @@ Or insert this function inside php file ( often it used to insert form inside pa
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
69
  = 1.13 =
70
  * Add support for variable products
71
  * Fix bugs
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GSE37FC4Y7CEY
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: 4.7.3
7
+ Stable tag: 1.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
59
 
60
  `echo do_shortcode( '[aws_search_form]' );`
61
 
62
+ = Is this plugin compatible with latest version of Woocommerce? =
63
+
64
+ Yep. This plugin is always compatible with the latest version of Woocommerce?
65
+
66
  == Screenshots ==
67
 
68
  1. Front-end view
70
 
71
  == Changelog ==
72
 
73
+ = 1.14 =
74
+ * Fix number of search results on search page
75
+ * Exclude draft products from search
76
+ * Fix bugs
77
+
78
  = 1.13 =
79
  * Add support for variable products
80
  * Fix bugs