Advanced Woo Search - Version 2.11

Version Description

( 2020-09-21 ) = * Add - Venedor theme support * Update - Option to add description for archive pages inside search results * Update - Support for OceanWP theme * Update - Diacritic chars list * Fix - Overwrite WooCommerce global products count if it is set to zero * Fix - Bug with get_image_id function * Fix - Settings page typos

Download this release

Release Info

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

Code changes from version 2.10 to 2.11

advanced-woo-search.php CHANGED
@@ -3,12 +3,12 @@
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
- Version: 2.10
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: advanced-woo-search
10
  WC requires at least: 3.0.0
11
- WC tested up to: 4.4.0
12
  */
13
 
14
 
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
17
  }
18
 
19
- define( 'AWS_VERSION', '2.10' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 2.11
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: advanced-woo-search
10
  WC requires at least: 3.0.0
11
+ WC tested up to: 4.5.0
12
  */
13
 
14
 
16
  exit;
17
  }
18
 
19
+ define( 'AWS_VERSION', '2.11' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
assets/js/common.js CHANGED
@@ -172,6 +172,9 @@ AwsHooks.filters = AwsHooks.filters || {};
172
  html += '<span class="aws_result_count">&nbsp;(' + taxitem.count + ')</span>';
173
  }
174
  html += '</span>';
 
 
 
175
  html += '</span>';
176
  html += '</a>';
177
  html += '</li>';
172
  html += '<span class="aws_result_count">&nbsp;(' + taxitem.count + ')</span>';
173
  }
174
  html += '</span>';
175
+ if ( ( typeof taxitem.excerpt !== 'undefined' ) && taxitem.excerpt ) {
176
+ html += '<span class="aws_result_excerpt">' + taxitem.excerpt + '</span>';
177
+ }
178
  html += '</span>';
179
  html += '</a>';
180
  html += '</li>';
includes/admin/class-aws-admin-options.php CHANGED
@@ -376,7 +376,7 @@ if ( ! class_exists( 'AWS_Admin_Options' ) ) :
376
 
377
  $options['form'][] = array(
378
  "name" => __( "Mobile full screen", "advanced-woo-search" ),
379
- "desc" => __( "Full screen search on focus. Will not works if search form is inside block with position: fixed.", "advanced-woo-search" ),
380
  "id" => "mobile_overlay",
381
  "value" => 'false',
382
  "type" => "radio",
376
 
377
  $options['form'][] = array(
378
  "name" => __( "Mobile full screen", "advanced-woo-search" ),
379
+ "desc" => __( "Full screen search on focus. Will not work if the search form is inside the block with position: fixed.", "advanced-woo-search" ),
380
  "id" => "mobile_overlay",
381
  "value" => 'false',
382
  "type" => "radio",
includes/class-aws-helpers.php CHANGED
@@ -367,6 +367,7 @@ if ( ! class_exists( 'AWS_Helpers' ) ) :
367
  'Í'=>'I',
368
  'Î'=>'I',
369
  'Ï'=>'I',
 
370
  'Ñ'=>'N',
371
  'Ò'=>'O',
372
  'Ó'=>'O',
367
  'Í'=>'I',
368
  'Î'=>'I',
369
  'Ï'=>'I',
370
+ 'İ'=>'I',
371
  'Ñ'=>'N',
372
  'Ò'=>'O',
373
  'Ó'=>'O',
includes/class-aws-integrations.php CHANGED
@@ -483,15 +483,24 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
483
  .oceanwp-theme #searchform-overlay .aws-container form {
484
  position: static;
485
  }
486
-
487
  .oceanwp-theme #searchform-overlay a.search-overlay-close {
488
  top: -100px;
489
  }
490
-
491
  #sidr .aws-container {
492
  margin: 30px 20px 0;
493
  }
494
-
 
 
 
 
 
 
 
 
 
 
 
495
  </style>
496
 
497
  <script>
@@ -963,6 +972,7 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
963
  $selectors[] = '#searchform-overlay form';
964
  $selectors[] = '#sidr .sidr-class-mobile-searchform';
965
  $selectors[] = '#mobile-menu-search form';
 
966
  }
967
 
968
  if ( 'Jupiter' === $this->current_theme ) {
@@ -974,6 +984,10 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
974
  $selectors[] = '.woodmart-search-form form, form.woodmart-ajax-search';
975
  }
976
 
 
 
 
 
977
  return $selectors;
978
 
979
  }
483
  .oceanwp-theme #searchform-overlay .aws-container form {
484
  position: static;
485
  }
 
486
  .oceanwp-theme #searchform-overlay a.search-overlay-close {
487
  top: -100px;
488
  }
 
489
  #sidr .aws-container {
490
  margin: 30px 20px 0;
491
  }
492
+ #medium-searchform .aws-container,
493
+ #vertical-searchform .aws-container {
494
+ background: #f5f5f5;
495
+ }
496
+ #medium-searchform .aws-container .aws-search-form .aws-search-field {
497
+ max-width: 100%;
498
+ }
499
+ #medium-searchform .aws-container .aws-search-form .aws-form-btn,
500
+ #vertical-searchform .aws-container .aws-search-form .aws-form-btn{
501
+ background: #f5f5f5;
502
+ border: none;
503
+ }
504
  </style>
505
 
506
  <script>
972
  $selectors[] = '#searchform-overlay form';
973
  $selectors[] = '#sidr .sidr-class-mobile-searchform';
974
  $selectors[] = '#mobile-menu-search form';
975
+ $selectors[] = '#site-header form';
976
  }
977
 
978
  if ( 'Jupiter' === $this->current_theme ) {
984
  $selectors[] = '.woodmart-search-form form, form.woodmart-ajax-search';
985
  }
986
 
987
+ if ( 'Venedor' === $this->current_theme ) {
988
+ $selectors[] = '#search-form form';
989
+ }
990
+
991
  return $selectors;
992
 
993
  }
includes/class-aws-search-page.php CHANGED
@@ -76,6 +76,9 @@ if ( ! class_exists( 'AWS_Search_Page' ) ) :
76
 
77
  add_filter( 'posts_pre_query', array( $this, 'posts_pre_query' ), 999, 2 );
78
 
 
 
 
79
  add_filter( 'body_class', array( $this, 'body_class' ), 999 );
80
 
81
  }
@@ -360,6 +363,18 @@ if ( ! class_exists( 'AWS_Search_Page' ) ) :
360
 
361
  }
362
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  /*
364
  * Update links for WooCommerce filter widgets
365
  */
76
 
77
  add_filter( 'posts_pre_query', array( $this, 'posts_pre_query' ), 999, 2 );
78
 
79
+ // Overwrite WooCommerce global products count if it is set to zero
80
+ add_filter( 'woocommerce_product_loop_start', array( $this, 'woocommerce_product_loop_start' ), 99999 );
81
+
82
  add_filter( 'body_class', array( $this, 'body_class' ), 999 );
83
 
84
  }
363
 
364
  }
365
 
366
+ /*
367
+ * Overwrite WooCommerce global products count if it is set to zero
368
+ */
369
+ public function woocommerce_product_loop_start( $loop_start ) {
370
+ if ( isset( $_GET['type_aws'] ) && isset( $this->data['all_products'] ) && ! empty( $this->data['all_products'] ) ) {
371
+ if ( isset( $GLOBALS['woocommerce_loop'] ) && isset( $GLOBALS['woocommerce_loop']['total'] ) && $GLOBALS['woocommerce_loop']['total'] === 0 ) {
372
+ $GLOBALS['woocommerce_loop']['total'] = count( $this->data['all_products'] );
373
+ }
374
+ }
375
+ return $loop_start;
376
+ }
377
+
378
  /*
379
  * Update links for WooCommerce filter widgets
380
  */
includes/class-aws-search.php CHANGED
@@ -589,8 +589,10 @@ if ( ! class_exists( 'AWS_Search' ) ) :
589
  */
590
  $image_size = apply_filters( 'aws_image_size', $image_size );
591
 
592
- $image_attributes = wp_get_attachment_image_src( $image_id, $image_size );
593
- $image = $image_attributes[0];
 
 
594
 
595
  }
596
 
589
  */
590
  $image_size = apply_filters( 'aws_image_size', $image_size );
591
 
592
+ if ( $image_id ) {
593
+ $image_attributes = wp_get_attachment_image_src( $image_id, $image_size );
594
+ $image = $image_attributes ? $image_attributes[0] : '';
595
+ }
596
 
597
  }
598
 
includes/class-aws-tax-search.php CHANGED
@@ -191,7 +191,8 @@ if ( ! class_exists( 'AWS_Tax_Search' ) ) :
191
  'name' => $result->name,
192
  'id' => $result->term_id,
193
  'count' => ( $result->count > 0 ) ? $result->count : '',
194
- 'link' => $term_link
 
195
  );
196
 
197
  $result_array[$result->taxonomy][] = $new_result;
191
  'name' => $result->name,
192
  'id' => $result->term_id,
193
  'count' => ( $result->count > 0 ) ? $result->count : '',
194
+ 'link' => $term_link,
195
+ 'excerpt' => '',
196
  );
197
 
198
  $result_array[$result->taxonomy][] = $new_result;
languages/advanced-woo-search-de_DE.po CHANGED
@@ -300,7 +300,7 @@ msgid "Mobile full screen"
300
  msgstr "Mobilgeräte-Ansicht volle Bildschirmgröße"
301
 
302
  msgid ""
303
- "Full screen search on focus. Will not works if search form is inside block "
304
  "with position: fixed."
305
  msgstr ""
306
  "Bildschirmfüllende Suche im Fokus. Wird nicht funktionieren, wenn das "
300
  msgstr "Mobilgeräte-Ansicht volle Bildschirmgröße"
301
 
302
  msgid ""
303
+ "Full screen search on focus. Will not work if the search form is inside the block "
304
  "with position: fixed."
305
  msgstr ""
306
  "Bildschirmfüllende Suche im Fokus. Wird nicht funktionieren, wenn das "
languages/advanced-woo-search.pot CHANGED
@@ -244,7 +244,7 @@ msgstr ""
244
  msgid "Mobile full screen"
245
  msgstr ""
246
 
247
- msgid "Full screen search on focus. Will not works if search form is inside block with position: fixed."
248
  msgstr ""
249
 
250
  msgid "Search Results"
244
  msgid "Mobile full screen"
245
  msgstr ""
246
 
247
+ msgid "Full screen search on focus. Will not work if the search form is inside the block with position: fixed."
248
  msgstr ""
249
 
250
  msgid "Search Results"
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.5
7
- Stable tag: 2.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -111,6 +111,15 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
111
 
112
  == Changelog ==
113
 
 
 
 
 
 
 
 
 
 
114
  = 2.10 ( 2020-09-07 ) =
115
  * Update - Storefront theme integration
116
  * Fix - Search results page output
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.5
7
+ Stable tag: 2.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
111
 
112
  == Changelog ==
113
 
114
+ = 2.11 ( 2020-09-21 ) =
115
+ * Add - Venedor theme support
116
+ * Update - Option to add description for archive pages inside search results
117
+ * Update - Support for OceanWP theme
118
+ * Update - Diacritic chars list
119
+ * Fix - Overwrite WooCommerce global products count if it is set to zero
120
+ * Fix - Bug with get_image_id function
121
+ * Fix - Settings page typos
122
+
123
  = 2.10 ( 2020-09-07 ) =
124
  * Update - Storefront theme integration
125
  * Fix - Search results page output