Advanced Woo Search - Version 1.07

Version Description

  • Exclude hidden products from search
  • Update translatable strings
Download this release

Release Info

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

Code changes from version 1.06 to 1.07

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.06
7
  Author: ILLID
8
  Text Domain: aws
9
  */
@@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  exit;
14
  }
15
 
16
- define( 'AWS_VERSION', '1.06' );
17
 
18
 
19
  define( 'AWS_DIR', dirname( __FILE__ ) );
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 1.07
7
  Author: ILLID
8
  Text Domain: aws
9
  */
13
  exit;
14
  }
15
 
16
+ define( 'AWS_VERSION', '1.07' );
17
 
18
 
19
  define( 'AWS_DIR', dirname( __FILE__ ) );
assets/js/common.js CHANGED
@@ -41,7 +41,7 @@
41
 
42
  $('body').append('<div id="aws-search-result-' + instance + '" class="aws-search-result" style="display: none;"></div>');
43
 
44
- methods.resultLayout();
45
 
46
  },
47
 
@@ -49,7 +49,7 @@
49
 
50
  searchFor = $searchField.val();
51
  searchFor = searchFor.trim();
52
- searchFor = searchFor.replace( /[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, '' );
53
  searchFor = searchFor.replace( /\s\s+/g, ' ' );
54
 
55
  for ( var i = 0; i < requests.length; i++ ) {
41
 
42
  $('body').append('<div id="aws-search-result-' + instance + '" class="aws-search-result" style="display: none;"></div>');
43
 
44
+ setTimeout(function() { methods.resultLayout(); }, 500)
45
 
46
  },
47
 
49
 
50
  searchFor = $searchField.val();
51
  searchFor = searchFor.trim();
52
+ searchFor = searchFor.replace( /[`~!@#$%^&*()_|+\?;:'",.<>\{\}\[\]\\\/]/gi, '' );
53
  searchFor = searchFor.replace( /\s\s+/g, ' ' );
54
 
55
  for ( var i = 0; i < requests.length; i++ ) {
includes/class-aws-admin.php CHANGED
@@ -36,7 +36,6 @@ class AWS_Admin {
36
  */
37
  public function add_admin_page() {
38
  add_menu_page( __( 'Adv. Woo Search', 'aws' ), __( 'Adv. Woo Search', 'aws' ), 'manage_options', 'aws-options', array( &$this, 'display_admin_page' ), 'dashicons-search' );
39
- //add_submenu_page( 'aws-options', 'Analytics', 'Analytics', 'manage_options', 'aws-analytics', array( &$this, 'display_admin_page' ) );
40
  }
41
 
42
  /**
@@ -61,7 +60,7 @@ class AWS_Admin {
61
 
62
  }
63
 
64
- $tabs_html .= '<a href="https://advanced-woo-search.com/" class="nav-tab premium-tab" target="_blank">Get Premium</a>';
65
 
66
  $tabs_html = '<h2 class="nav-tab-wrapper woo-nav-tab-wrapper">'.$tabs_html.'</h2>';
67
 
@@ -127,7 +126,7 @@ class AWS_Admin {
127
  echo '</tbody>';
128
  echo '</table>';
129
 
130
- echo '<p class="submit"><input name="Submit" type="submit" class="button-primary" value="Save Changes" /></p>';
131
 
132
  echo '</form>';
133
 
@@ -349,8 +348,8 @@ class AWS_Admin {
349
 
350
  echo '<th>Reindex table</th>';
351
  echo '<td>';
352
- echo '<div id="aws-reindex"><input class="button" type="button" value="Reindex table"><span class="loader"></span></div><br><br>';
353
- echo '<span class="description">Update all data in plugins index table. Index table - table with products data where plugin is searching all typed terms.<br>Use this button if you think that plugin not shows last actual data in its search results.<br><strong>CAUTION:</strong> this can take large amount of time.</span>';
354
  echo '</td>';
355
 
356
  echo '<tr>';
@@ -360,8 +359,8 @@ class AWS_Admin {
360
 
361
  echo '<th>Clear cache</th>';
362
  echo '<td>';
363
- echo '<div id="aws-clear-cache"><input class="button" type="button" value="Clear cache"><span class="loader"></span></div><br>';
364
- echo '<span class="description">Clear cache for all search results.</span>';
365
  echo '</td>';
366
 
367
  echo '<tr>';
36
  */
37
  public function add_admin_page() {
38
  add_menu_page( __( 'Adv. Woo Search', 'aws' ), __( 'Adv. Woo Search', 'aws' ), 'manage_options', 'aws-options', array( &$this, 'display_admin_page' ), 'dashicons-search' );
 
39
  }
40
 
41
  /**
60
 
61
  }
62
 
63
+ $tabs_html .= '<a href="https://advanced-woo-search.com/" class="nav-tab premium-tab" target="_blank">' . __( 'Get Premium', 'aws' ) . '</a>';
64
 
65
  $tabs_html = '<h2 class="nav-tab-wrapper woo-nav-tab-wrapper">'.$tabs_html.'</h2>';
66
 
126
  echo '</tbody>';
127
  echo '</table>';
128
 
129
+ echo '<p class="submit"><input name="Submit" type="submit" class="button-primary" value="' . __( 'Save Changes', 'aws' ) . '" /></p>';
130
 
131
  echo '</form>';
132
 
348
 
349
  echo '<th>Reindex table</th>';
350
  echo '<td>';
351
+ echo '<div id="aws-reindex"><input class="button" type="button" value="' . __( 'Reindex table', 'aws' ) . '"><span class="loader"></span></div><br><br>';
352
+ echo '<span class="description">' . __( 'Update all data in plugins index table. Index table - table with products data where plugin is searching all typed terms.<br>Use this button if you think that plugin not shows last actual data in its search results.<br><strong>CAUTION:</strong> this can take large amount of time.</span>', 'aws' );
353
  echo '</td>';
354
 
355
  echo '<tr>';
359
 
360
  echo '<th>Clear cache</th>';
361
  echo '<td>';
362
+ echo '<div id="aws-clear-cache"><input class="button" type="button" value="' . __( 'Clear cache', 'aws' ) . '"><span class="loader"></span></div><br>';
363
+ echo '<span class="description">' . __( 'Clear cache for all search results.', 'aws' ) . '</span>';
364
  echo '</td>';
365
 
366
  echo '<tr>';
includes/class-aws-table.php CHANGED
@@ -107,6 +107,12 @@ if ( ! class_exists( 'AWS_Table' ) ) :
107
 
108
  $id = $post->ID;
109
 
 
 
 
 
 
 
110
  $product = new WC_product( $id );
111
 
112
  $sku = $product->get_sku();
107
 
108
  $id = $post->ID;
109
 
110
+ $custom = get_post_custom($id);
111
+
112
+ if ( isset( $custom['_visibility'] ) && $custom['_visibility'][0] == 'hidden' ) {
113
+ continue;
114
+ }
115
+
116
  $product = new WC_product( $id );
117
 
118
  $sku = $product->get_sku();
includes/options.php CHANGED
@@ -40,8 +40,8 @@ $options['general'][] = array(
40
  "value" => 'true',
41
  "type" => "radio",
42
  'choices' => array(
43
- 'true' => 'On',
44
- 'false' => 'Off'
45
  )
46
  );
47
 
@@ -52,8 +52,8 @@ $options['general'][] = array(
52
  "value" => 'true',
53
  "type" => "radio",
54
  'choices' => array(
55
- 'true' => 'On',
56
- 'false' => 'Off'
57
  )
58
  );
59
 
@@ -64,8 +64,8 @@ $options['general'][] = array(
64
  "value" => 'true',
65
  "type" => "radio",
66
  'choices' => array(
67
- 'true' => 'On',
68
- 'false' => 'Off'
69
  )
70
  );
71
 
@@ -96,8 +96,8 @@ $options['general'][] = array(
96
  "value" => 'true',
97
  "type" => "radio",
98
  'choices' => array(
99
- 'true' => 'On',
100
- 'false' => 'Off'
101
  )
102
  );
103
 
@@ -108,8 +108,8 @@ $options['general'][] = array(
108
  "value" => 'true',
109
  "type" => "radio",
110
  'choices' => array(
111
- 'true' => 'Smart scrapping sentences with searching terms from product description.',
112
- 'false' => 'First N words of product description ( number of words that you choose below. )'
113
  )
114
  );
115
 
@@ -120,8 +120,8 @@ $options['general'][] = array(
120
  "value" => 'false',
121
  "type" => "radio",
122
  'choices' => array(
123
- 'true' => 'On',
124
- 'false' => 'Off'
125
  )
126
  );
127
 
@@ -132,8 +132,8 @@ $options['general'][] = array(
132
  "value" => 'false',
133
  "type" => "radio",
134
  'choices' => array(
135
- 'true' => 'On',
136
- 'false' => 'Off'
137
  )
138
  );
139
 
@@ -144,8 +144,8 @@ $options['general'][] = array(
144
  "value" => 'true',
145
  "type" => "radio",
146
  'choices' => array(
147
- 'true' => 'On',
148
- 'false' => 'Off'
149
  )
150
  );
151
 
@@ -156,8 +156,8 @@ $options['general'][] = array(
156
  "value" => 'false',
157
  "type" => "radio",
158
  'choices' => array(
159
- 'true' => 'On',
160
- 'false' => 'Off'
161
  )
162
  );
163
 
40
  "value" => 'true',
41
  "type" => "radio",
42
  'choices' => array(
43
+ 'true' => __( 'On', 'aws' ),
44
+ 'false' => __( 'Off', 'aws' ),
45
  )
46
  );
47
 
52
  "value" => 'true',
53
  "type" => "radio",
54
  'choices' => array(
55
+ 'true' => __( 'On', 'aws' ),
56
+ 'false' => __( 'Off', 'aws' ),
57
  )
58
  );
59
 
64
  "value" => 'true',
65
  "type" => "radio",
66
  'choices' => array(
67
+ 'true' => __( 'On', 'aws' ),
68
+ 'false' => __( 'Off', 'aws' ),
69
  )
70
  );
71
 
96
  "value" => 'true',
97
  "type" => "radio",
98
  'choices' => array(
99
+ 'true' => __( 'On', 'aws' ),
100
+ 'false' => __( 'Off', 'aws' ),
101
  )
102
  );
103
 
108
  "value" => 'true',
109
  "type" => "radio",
110
  'choices' => array(
111
+ 'true' => __( "Smart scrapping sentences with searching terms from product description.", "aws" ),
112
+ 'false' => __( "First N words of product description ( number of words that you choose below. )", "aws" ),
113
  )
114
  );
115
 
120
  "value" => 'false',
121
  "type" => "radio",
122
  'choices' => array(
123
+ 'true' => __( 'On', 'aws' ),
124
+ 'false' => __( 'Off', 'aws' ),
125
  )
126
  );
127
 
132
  "value" => 'false',
133
  "type" => "radio",
134
  'choices' => array(
135
+ 'true' => __( 'On', 'aws' ),
136
+ 'false' => __( 'Off', 'aws' ),
137
  )
138
  );
139
 
144
  "value" => 'true',
145
  "type" => "radio",
146
  'choices' => array(
147
+ 'true' => __( 'On', 'aws' ),
148
+ 'false' => __( 'Off', 'aws' ),
149
  )
150
  );
151
 
156
  "value" => 'false',
157
  "type" => "radio",
158
  'choices' => array(
159
+ 'true' => __( 'On', 'aws' ),
160
+ 'false' => __( 'Off', 'aws' ),
161
  )
162
  );
163
 
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: 4.5.2
7
- Stable tag: 1.06
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -64,6 +64,10 @@ Or insert this function inside php file ( often it used to insert form inside pa
64
 
65
  == Changelog ==
66
 
 
 
 
 
67
  = 1.06 =
68
  * Cache search results to increase search speed
69
 
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.5.2
7
+ Stable tag: 1.07
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
64
 
65
  == Changelog ==
66
 
67
+ = 1.07 =
68
+ * Exclude hidden products from search
69
+ * Update translatable strings
70
+
71
  = 1.06 =
72
  * Cache search results to increase search speed
73