Advanced Woo Search - Version 1.75

Version Description

  • Fix - Brands filter for search results page
  • Fix - Polylang plugin search results page URL
  • Update - filters parameters
Download this release

Release Info

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

Code changes from version 1.74 to 1.75

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.74
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: aws
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
17
  }
18
 
19
- define( 'AWS_VERSION', '1.74' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 1.75
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: aws
16
  exit;
17
  }
18
 
19
+ define( 'AWS_VERSION', '1.75' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
includes/class-aws-markup.php CHANGED
@@ -44,6 +44,10 @@ if ( ! class_exists( 'AWS_Markup' ) ) :
44
  parse_str( $url_array['query'], $url_query_parts );
45
  }
46
 
 
 
 
 
47
 
48
  $params_string = '';
49
 
@@ -76,7 +80,7 @@ if ( ! class_exists( 'AWS_Markup' ) ) :
76
 
77
  $markup = '';
78
  $markup .= '<div class="aws-container" ' . $params_string . '>';
79
- $markup .= '<form class="aws-search-form" action="' . home_url('/') . '" method="get" role="search" >';
80
 
81
  $markup .= '<div class="aws-wrapper">';
82
 
44
  parse_str( $url_array['query'], $url_query_parts );
45
  }
46
 
47
+ $form_action = home_url( '/' );
48
+ if ( function_exists( 'pll_home_url' ) ) {
49
+ $form_action = pll_home_url();
50
+ }
51
 
52
  $params_string = '';
53
 
80
 
81
  $markup = '';
82
  $markup .= '<div class="aws-container" ' . $params_string . '>';
83
+ $markup .= '<form class="aws-search-form" action="' . $form_action . '" method="get" role="search" >';
84
 
85
  $markup .= '<div class="aws-wrapper">';
86
 
includes/class-aws-order.php CHANGED
@@ -43,6 +43,7 @@ if ( ! class_exists( 'AWS_Order' ) ) :
43
  $price_min = false;
44
  $price_max = false;
45
  $rating = false;
 
46
 
47
  $attr_filter = array();
48
 
@@ -63,6 +64,10 @@ if ( ! class_exists( 'AWS_Order' ) ) :
63
  $rating = explode( ',', sanitize_text_field( $_GET['rating_filter'] ) );
64
  }
65
 
 
 
 
 
66
  if ( isset( $query->query_vars['tax_query'] ) ) {
67
  $tax_query = $query->query_vars['tax_query'];
68
 
@@ -97,6 +102,26 @@ if ( ! class_exists( 'AWS_Order' ) ) :
97
  }
98
  }
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  if ( $attr_filter && ! empty( $attr_filter ) ) {
101
 
102
  $product = wc_get_product( $post_array['id'] );
43
  $price_min = false;
44
  $price_max = false;
45
  $rating = false;
46
+ $brand = false;
47
 
48
  $attr_filter = array();
49
 
64
  $rating = explode( ',', sanitize_text_field( $_GET['rating_filter'] ) );
65
  }
66
 
67
+ if ( isset( $_GET['filtering'] ) && $_GET['filtering'] && isset( $_GET['filter_product_brand'] ) ) {
68
+ $brand = explode( ',', sanitize_text_field( $_GET['filter_product_brand'] ) );
69
+ }
70
+
71
  if ( isset( $query->query_vars['tax_query'] ) ) {
72
  $tax_query = $query->query_vars['tax_query'];
73
 
102
  }
103
  }
104
 
105
+ if ( $brand && is_array( $brand ) ) {
106
+
107
+ $skip = true;
108
+ $p_brands = get_the_terms( $post_array['id'], 'product_brand' );
109
+
110
+ if ( ! is_wp_error( $p_brands ) && ! empty( $p_brands ) ) {
111
+ foreach ( $p_brands as $p_brand ) {
112
+ if ( in_array( $p_brand->term_id, $brand ) ) {
113
+ $skip = false;
114
+ break;
115
+ }
116
+ }
117
+ }
118
+
119
+ if ( $skip ) {
120
+ continue;
121
+ }
122
+
123
+ }
124
+
125
  if ( $attr_filter && ! empty( $attr_filter ) ) {
126
 
127
  $product = wc_get_product( $post_array['id'] );
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.2
7
- Stable tag: 1.74
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -103,6 +103,11 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
103
 
104
  == Changelog ==
105
 
 
 
 
 
 
106
  = 1.74 =
107
  * Fix - Issue with not working search page when using Elementor page builder
108
  * Fix - Issue with not working search page when using Divi page builder
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.2
7
+ Stable tag: 1.75
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
103
 
104
  == Changelog ==
105
 
106
+ = 1.75 =
107
+ * Fix - Brands filter for search results page
108
+ * Fix - Polylang plugin search results page URL
109
+ * Update - filters parameters
110
+
111
  = 1.74 =
112
  * Fix - Issue with not working search page when using Elementor page builder
113
  * Fix - Issue with not working search page when using Divi page builder