Advanced Woo Search - Version 2.59

Version Description

( 2022-07-25 ) = * Add - Support for Vandana theme * Update - Tested with WC 6.7 * Update - Admin dashboard plugin notices * Fix - WPML plugin integration bug with taxonomies search * Fix - Integration bug for WooCommerce Product Filter by WooBeWoo plugin * Dev - Add aws_ajax_request_params js hook

Download this release

Release Info

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

Code changes from version 2.58 to 2.59

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.58
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: 6.6.0
12
  */
13
 
14
 
@@ -96,7 +96,7 @@ final class AWS_Main {
96
  */
97
  private function define_constants() {
98
 
99
- $this->define( 'AWS_VERSION', '2.58' );
100
 
101
  $this->define( 'AWS_DIR', plugin_dir_path( AWS_FILE ) );
102
  $this->define( 'AWS_URL', plugin_dir_url( AWS_FILE ) );
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 2.59
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: 6.7.0
12
  */
13
 
14
 
96
  */
97
  private function define_constants() {
98
 
99
+ $this->define( 'AWS_VERSION', '2.59' );
100
 
101
  $this->define( 'AWS_DIR', plugin_dir_path( AWS_FILE ) );
102
  $this->define( 'AWS_URL', plugin_dir_url( AWS_FILE ) );
assets/js/common.js CHANGED
@@ -126,6 +126,8 @@ AwsHooks.filters = AwsHooks.filters || {};
126
  typedata: 'json'
127
  };
128
 
 
 
129
  requests.push(
130
 
131
  $.ajax({
126
  typedata: 'json'
127
  };
128
 
129
+ data = AwsHooks.apply_filters( 'aws_ajax_request_params', data, { instance: instance, form: self, data: d } );
130
+
131
  requests.push(
132
 
133
  $.ajax({
includes/admin/class-aws-admin-notices.php CHANGED
@@ -60,7 +60,8 @@ if ( ! class_exists( 'AWS_Admin_Notices' ) ) :
60
  return;
61
  }
62
 
63
- if ( ! class_exists( 'WCFMmp' ) && ! class_exists('ACF') && ! class_exists('YITH_WCWL') && ! class_exists( 'WooCommerceWholeSalePrices' ) && ! class_exists( 'UM_Functions' ) && ! defined( 'PWB_PLUGIN_VERSION' ) && ! defined( 'TINVWL_FVERSION' ) ) {
 
64
  return;
65
  }
66
 
@@ -104,6 +105,11 @@ if ( ! class_exists( 'AWS_Admin_Notices' ) ) :
104
  $notice_id .= 'tinvwl|';
105
  }
106
 
 
 
 
 
 
107
  $notice_id = 'aws_hide_int_notices=' . urlencode( trim( $notice_id, '|' ) );
108
 
109
  if ( $notice_message ) {
60
  return;
61
  }
62
 
63
+ if ( ! class_exists( 'WCFMmp' ) && ! class_exists('ACF') && ! class_exists('YITH_WCWL') && ! class_exists( 'WooCommerceWholeSalePrices' ) && ! class_exists( 'UM_Functions' ) && ! defined( 'PWB_PLUGIN_VERSION' )
64
+ && ! defined( 'TINVWL_FVERSION' ) && ! class_exists( 'WeDevs_Dokan' ) ) {
65
  return;
66
  }
67
 
105
  $notice_id .= 'tinvwl|';
106
  }
107
 
108
+ if ( class_exists( 'WeDevs_Dokan' ) && ( ! $hide_option || array_search( 'dokan', $hide_option ) === false ) ) {
109
+ $notice_message .= '<li>' . __( 'Dokan – WooCommerce Multivendor Marketplace Solution plugin.', 'advanced-woo-search' ) . ' <a target="_blank" href="https://advanced-woo-search.com/guide/dokan-woocommerce-multivendor-marketplace/?utm_source=wp-plugin&utm_medium=integration_notice&utm_campaign=dokan">' . __( 'Learn more', 'advanced-woo-search' ) . '</a></li>';
110
+ $notice_id .= 'dokan|';
111
+ }
112
+
113
  $notice_id = 'aws_hide_int_notices=' . urlencode( trim( $notice_id, '|' ) );
114
 
115
  if ( $notice_message ) {
includes/class-aws-integrations.php CHANGED
@@ -205,6 +205,11 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
205
  add_filter( 'aws_js_seamless_searchbox_markup', array( $this, 'savoy_seamless_searchbox_markup' ), 1 );
206
  }
207
 
 
 
 
 
 
208
  }
209
 
210
  add_action( 'wp_head', array( $this, 'head_js_integration' ) );
@@ -1509,6 +1514,32 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
1509
  return $markup;
1510
  }
1511
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1512
  /*
1513
  * Exclude product categories
1514
  */
205
  add_filter( 'aws_js_seamless_searchbox_markup', array( $this, 'savoy_seamless_searchbox_markup' ), 1 );
206
  }
207
 
208
+ if ( 'Vandana Lite' === $this->current_theme ) {
209
+ add_filter( 'aws_searchbox_markup', array( $this, 'vandana_searchbox_markup' ), 1 );
210
+ add_action( 'wp_head', array( $this, 'vandana_wp_head' ) );
211
+ }
212
+
213
  }
214
 
215
  add_action( 'wp_head', array( $this, 'head_js_integration' ) );
1514
  return $markup;
1515
  }
1516
 
1517
+ /*
1518
+ * Vandana theme markup changes
1519
+ */
1520
+ public function vandana_searchbox_markup( $markup ) {
1521
+ $markup = str_replace( 'aws-container', 'aws-container search-form', $markup );
1522
+ return $markup;
1523
+ }
1524
+
1525
+ /*
1526
+ * Vandana theme custom styles
1527
+ */
1528
+ public function vandana_wp_head() { ?>
1529
+ <style>
1530
+ .header-search .header-search-wrap .aws-container .aws-show-clear .aws-search-field,
1531
+ .header-search .header-search-wrap .aws-container .aws-search-form .aws-form-btn{
1532
+ background: transparent;
1533
+ border: none;
1534
+ color: #fff;
1535
+ font-size: 2em;
1536
+ }
1537
+ .header-search .header-search-wrap .aws-container .aws-search-form .aws-search-btn_icon {
1538
+ color: #fff;
1539
+ }
1540
+ </style>
1541
+ <?php }
1542
+
1543
  /*
1544
  * Exclude product categories
1545
  */
includes/class-aws-tax-search.php CHANGED
@@ -124,12 +124,14 @@ if ( ! class_exists( 'AWS_Tax_Search' ) ) :
124
  if ( $lang ) {
125
  $terms = get_terms( array(
126
  'taxonomy' => $this->taxonomy,
127
- 'hide_empty' => true,
128
  'fields' => 'ids',
129
  'lang' => $lang
130
  ) );
131
  if ( $terms ) {
132
  $search_query .= sprintf( " AND ( " . $wpdb->terms . ".term_id IN ( %s ) )", implode( ',', $terms ) );
 
 
133
  }
134
  }
135
 
124
  if ( $lang ) {
125
  $terms = get_terms( array(
126
  'taxonomy' => $this->taxonomy,
127
+ 'hide_empty' => false,
128
  'fields' => 'ids',
129
  'lang' => $lang
130
  ) );
131
  if ( $terms ) {
132
  $search_query .= sprintf( " AND ( " . $wpdb->terms . ".term_id IN ( %s ) )", implode( ',', $terms ) );
133
+ } else {
134
+ $search_query .= " AND 1=2";
135
  }
136
  }
137
 
includes/modules/class-aws-woobewoo-filters.php CHANGED
@@ -80,7 +80,7 @@ if (!class_exists('AWS_Woobewoo_Filters')) :
80
  * WooCommerce Product Filter by WooBeWoo: filter products
81
  */
82
  public function wpf_search_page_filters( $filters ) {
83
-
84
  foreach ( $_GET as $key => $param ) {
85
 
86
  $isNot = ( substr($param, 0, 1) === '!' );
@@ -134,12 +134,13 @@ if (!class_exists('AWS_Woobewoo_Filters')) :
134
  }
135
  $filters['rating'] = $rating;
136
  }
137
- elseif ( strpos( $key, 'filter_' ) === 0 ) {
138
 
139
  if ( strpos( $key, 'filter_pwb_' ) === 0 ) {
140
  $taxonomy = 'pwb-brand';
141
  } else {
142
- $taxonomy = str_replace( 'filter_', '', $key );
 
143
  }
144
 
145
  if ( preg_match( '/([a-z]+?)_[\d]/', $taxonomy, $matches ) ) {
80
  * WooCommerce Product Filter by WooBeWoo: filter products
81
  */
82
  public function wpf_search_page_filters( $filters ) {
83
+
84
  foreach ( $_GET as $key => $param ) {
85
 
86
  $isNot = ( substr($param, 0, 1) === '!' );
134
  }
135
  $filters['rating'] = $rating;
136
  }
137
+ elseif ( strpos( $key, 'filter_' ) === 0 || strpos( $key, 'wpf_filter_' ) === 0 ) {
138
 
139
  if ( strpos( $key, 'filter_pwb_' ) === 0 ) {
140
  $taxonomy = 'pwb-brand';
141
  } else {
142
+ $taxonomy = str_replace( 'wpf_filter_', '', $key );
143
+ $taxonomy = str_replace( 'filter_', '', $taxonomy );
144
  }
145
 
146
  if ( preg_match( '/([a-z]+?)_[\d]/', $taxonomy, $matches ) ) {
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: 6.0
7
- Stable tag: 2.58
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -64,8 +64,9 @@ Additional features available only in PRO plugin version.
64
  * AND or OR search logic
65
  * **Add to cart** button in search results
66
  * Support for [WooCommerce Brands plugin](https://woocommerce.com/products/brands/)
67
- * Support for Advanced Custom Fields plugin
68
- * Support for WCFM - WooCommerce Multivendor Marketplace plugin
 
69
 
70
  [Features list](https://advanced-woo-search.com/features/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo)
71
 
@@ -167,6 +168,14 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
167
 
168
  == Changelog ==
169
 
 
 
 
 
 
 
 
 
170
  = 2.58 ( 2022-07-11 ) =
171
  * Fix - Bug with synonyms words indexation
172
 
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: 6.0
7
+ Stable tag: 2.59
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
64
  * AND or OR search logic
65
  * **Add to cart** button in search results
66
  * Support for [WooCommerce Brands plugin](https://woocommerce.com/products/brands/)
67
+ * Support for **Advanced Custom Fields** plugin
68
+ * Support for **WCFM - WooCommerce Multivendor Marketplace** plugin
69
+ * Support for **Dokan – WooCommerce Multivendor Marketplace** plugin
70
 
71
  [Features list](https://advanced-woo-search.com/features/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo)
72
 
168
 
169
  == Changelog ==
170
 
171
+ = 2.59 ( 2022-07-25 ) =
172
+ * Add - Support for Vandana theme
173
+ * Update - Tested with WC 6.7
174
+ * Update - Admin dashboard plugin notices
175
+ * Fix - WPML plugin integration bug with taxonomies search
176
+ * Fix - Integration bug for WooCommerce Product Filter by WooBeWoo plugin
177
+ * Dev - Add aws_ajax_request_params js hook
178
+
179
  = 2.58 ( 2022-07-11 ) =
180
  * Fix - Bug with synonyms words indexation
181