Version Description
- Fix - Ajax request cache problem
- Fix - Polylang plugin fix search results page URL
Download this release
Release Info
Developer | Mihail Barinov |
Plugin | Advanced Woo Search |
Version | 1.95 |
Comparing to | |
See all releases |
Code changes from version 1.94 to 1.95
- advanced-woo-search.php +2 -2
- assets/js/common.js +2 -1
- includes/class-aws-helpers.php +33 -0
- includes/class-aws-markup.php +1 -4
- includes/class-aws-search.php +1 -1
- readme.txt +5 -1
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.
|
7 |
Author: ILLID
|
8 |
Author URI: https://advanced-woo-search.com/
|
9 |
Text Domain: advanced-woo-search
|
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
16 |
exit;
|
17 |
}
|
18 |
|
19 |
-
define( 'AWS_VERSION', '1.
|
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.95
|
7 |
Author: ILLID
|
8 |
Author URI: https://advanced-woo-search.com/
|
9 |
Text Domain: advanced-woo-search
|
16 |
exit;
|
17 |
}
|
18 |
|
19 |
+
define( 'AWS_VERSION', '1.95' );
|
20 |
|
21 |
|
22 |
define( 'AWS_DIR', dirname( __FILE__ ) );
|
assets/js/common.js
CHANGED
@@ -77,7 +77,8 @@
|
|
77 |
page: d.pageId,
|
78 |
tax: d.tax,
|
79 |
lang: d.lang,
|
80 |
-
pageurl: window.location.href
|
|
|
81 |
};
|
82 |
|
83 |
requests.push(
|
77 |
page: d.pageId,
|
78 |
tax: d.tax,
|
79 |
lang: d.lang,
|
80 |
+
pageurl: window.location.href,
|
81 |
+
typedata: 'json'
|
82 |
};
|
83 |
|
84 |
requests.push(
|
includes/class-aws-helpers.php
CHANGED
@@ -683,6 +683,39 @@ if ( ! class_exists( 'AWS_Helpers' ) ) :
|
|
683 |
|
684 |
}
|
685 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
/*
|
687 |
* Get string with current product terms names
|
688 |
*
|
683 |
|
684 |
}
|
685 |
|
686 |
+
/*
|
687 |
+
* Get search form action link
|
688 |
+
*
|
689 |
+
* @return string Search URL
|
690 |
+
*/
|
691 |
+
static public function get_search_url() {
|
692 |
+
|
693 |
+
$search_url = home_url( '/' );
|
694 |
+
|
695 |
+
if ( function_exists( 'pll_home_url' ) ) {
|
696 |
+
|
697 |
+
$search_url = pll_home_url();
|
698 |
+
|
699 |
+
if ( get_option( 'show_on_front' ) === 'page' ) {
|
700 |
+
|
701 |
+
$current_language = pll_current_language();
|
702 |
+
$default_language = pll_default_language();
|
703 |
+
|
704 |
+
if ( $current_language != $default_language ) {
|
705 |
+
if ( strpos( $search_url, '/' . $current_language ) !== false ) {
|
706 |
+
$language_subdir = $current_language.'/';
|
707 |
+
$search_url = home_url( '/' . $language_subdir );
|
708 |
+
}
|
709 |
+
}
|
710 |
+
|
711 |
+
}
|
712 |
+
|
713 |
+
}
|
714 |
+
|
715 |
+
return $search_url;
|
716 |
+
|
717 |
+
}
|
718 |
+
|
719 |
/*
|
720 |
* Get string with current product terms names
|
721 |
*
|
includes/class-aws-markup.php
CHANGED
@@ -44,10 +44,7 @@ if ( ! class_exists( 'AWS_Markup' ) ) :
|
|
44 |
parse_str( $url_array['query'], $url_query_parts );
|
45 |
}
|
46 |
|
47 |
-
$form_action =
|
48 |
-
if ( function_exists( 'pll_home_url' ) ) {
|
49 |
-
$form_action = pll_home_url();
|
50 |
-
}
|
51 |
|
52 |
$params_string = '';
|
53 |
|
44 |
parse_str( $url_array['query'], $url_query_parts );
|
45 |
}
|
46 |
|
47 |
+
$form_action = AWS_Helpers::get_search_url();
|
|
|
|
|
|
|
48 |
|
49 |
$params_string = '';
|
50 |
|
includes/class-aws-search.php
CHANGED
@@ -67,7 +67,7 @@ if ( ! class_exists( 'AWS_Search' ) ) :
|
|
67 |
define( 'DOING_AJAX', true );
|
68 |
}
|
69 |
|
70 |
-
if ( ! headers_sent() ) {
|
71 |
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
72 |
}
|
73 |
|
67 |
define( 'DOING_AJAX', true );
|
68 |
}
|
69 |
|
70 |
+
if ( ! headers_sent() && isset( $_REQUEST['typedata'] ) ) {
|
71 |
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
72 |
}
|
73 |
|
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.3
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -104,6 +104,10 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
|
|
104 |
|
105 |
== Changelog ==
|
106 |
|
|
|
|
|
|
|
|
|
107 |
= 1.94 =
|
108 |
* Update - Ajax function
|
109 |
* Update - Twenty Twenty theme integration
|
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.3
|
7 |
+
Stable tag: 1.95
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
104 |
|
105 |
== Changelog ==
|
106 |
|
107 |
+
= 1.95 =
|
108 |
+
* Fix - Ajax request cache problem
|
109 |
+
* Fix - Polylang plugin fix search results page URL
|
110 |
+
|
111 |
= 1.94 =
|
112 |
* Update - Ajax function
|
113 |
* Update - Twenty Twenty theme integration
|