Version Description
( 2022-05-16 ) = * Add - Support for Gecko theme * Update - Tested with WC 6.5 * Update - Admin page integration notices * Update - Support for Be theme * Fix - Translations for stock statuses inside search results * Fix - Error notice for Elementor plugin search module * Fix - Php error notice about default options values * Fix - Length of products search results descriptions * Dev - Fix error with empty search query for results page
Download this release
Release Info
Developer | Mihail Barinov |
Plugin | Advanced Woo Search |
Version | 2.54 |
Comparing to | |
See all releases |
Code changes from version 2.53 to 2.54
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.
|
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.
|
12 |
*/
|
13 |
|
14 |
|
@@ -96,7 +96,7 @@ final class AWS_Main {
|
|
96 |
*/
|
97 |
private function define_constants() {
|
98 |
|
99 |
-
$this->define( 'AWS_VERSION', '2.
|
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.54
|
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.5.0
|
12 |
*/
|
13 |
|
14 |
|
96 |
*/
|
97 |
private function define_constants() {
|
98 |
|
99 |
+
$this->define( 'AWS_VERSION', '2.54' );
|
100 |
|
101 |
$this->define( 'AWS_DIR', plugin_dir_path( AWS_FILE ) );
|
102 |
$this->define( 'AWS_URL', plugin_dir_url( AWS_FILE ) );
|
includes/admin/class-aws-admin-notices.php
CHANGED
@@ -60,7 +60,7 @@ if ( ! class_exists( 'AWS_Admin_Notices' ) ) :
|
|
60 |
return;
|
61 |
}
|
62 |
|
63 |
-
if ( ! class_exists( 'WCFMmp' ) && ! class_exists('ACF') ) {
|
64 |
return;
|
65 |
}
|
66 |
|
@@ -79,6 +79,11 @@ if ( ! class_exists( 'AWS_Admin_Notices' ) ) :
|
|
79 |
$notice_id .= 'acf|';
|
80 |
}
|
81 |
|
|
|
|
|
|
|
|
|
|
|
82 |
$notice_id = 'aws_hide_int_notices=' . urlencode( trim( $notice_id, '|' ) );
|
83 |
|
84 |
if ( $notice_message ) {
|
60 |
return;
|
61 |
}
|
62 |
|
63 |
+
if ( ! class_exists( 'WCFMmp' ) && ! class_exists('ACF') && ! class_exists('YITH_WCWL') ) {
|
64 |
return;
|
65 |
}
|
66 |
|
79 |
$notice_id .= 'acf|';
|
80 |
}
|
81 |
|
82 |
+
if ( class_exists( 'YITH_WCWL' ) && ( ! $hide_option || array_search( 'yithwish', $hide_option ) === false ) ) {
|
83 |
+
$notice_message .= '<li>' . __( 'YITH WooCommerce Wishlist plugin.', 'advanced-woo-search' ) . ' <a target="_blank" href="https://advanced-woo-search.com/guide/yith-woocommerce-wishlist/?utm_source=wp-plugin&utm_medium=integration_notice&utm_campaign=yithwish">' . __( 'Learn more', 'advanced-woo-search' ) . '</a></li>';
|
84 |
+
$notice_id .= 'yithwish|';
|
85 |
+
}
|
86 |
+
|
87 |
$notice_id = 'aws_hide_int_notices=' . urlencode( trim( $notice_id, '|' ) );
|
88 |
|
89 |
if ( $notice_message ) {
|
includes/admin/class-aws-admin-options.php
CHANGED
@@ -30,6 +30,10 @@ if ( ! class_exists( 'AWS_Admin_Options' ) ) :
|
|
30 |
continue;
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
33 |
if ( isset( $values['type'] ) && $values['type'] === 'table' && empty( $values['value'] ) ) {
|
34 |
continue;
|
35 |
}
|
@@ -80,7 +84,7 @@ if ( ! class_exists( 'AWS_Admin_Options' ) ) :
|
|
80 |
|
81 |
foreach ( $options[$current_tab] as $values ) {
|
82 |
|
83 |
-
if ( $values['type'] === 'heading' || $values['type'] === 'table' ) {
|
84 |
continue;
|
85 |
}
|
86 |
|
30 |
continue;
|
31 |
}
|
32 |
|
33 |
+
if ( isset( $values['type'] ) && $values['type'] === 'html' ) {
|
34 |
+
continue;
|
35 |
+
}
|
36 |
+
|
37 |
if ( isset( $values['type'] ) && $values['type'] === 'table' && empty( $values['value'] ) ) {
|
38 |
continue;
|
39 |
}
|
84 |
|
85 |
foreach ( $options[$current_tab] as $values ) {
|
86 |
|
87 |
+
if ( $values['type'] === 'heading' || $values['type'] === 'table' || $values['type'] === 'html' ) {
|
88 |
continue;
|
89 |
}
|
90 |
|
includes/class-aws-integrations.php
CHANGED
@@ -192,6 +192,15 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
192 |
add_action( 'wp_head', array( $this, 'orchid_store_wp_head' ) );
|
193 |
}
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
}
|
196 |
|
197 |
add_action( 'wp_head', array( $this, 'head_js_integration' ) );
|
@@ -1401,6 +1410,88 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
1401 |
</style>
|
1402 |
<?php }
|
1403 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1404 |
/*
|
1405 |
* Exclude product categories
|
1406 |
*/
|
@@ -1635,6 +1726,14 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
1635 |
$selectors[] = '.basel-search-wrapper #searchform, .secondary-header #searchform, .mobile-nav #searchform';
|
1636 |
}
|
1637 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1638 |
// WCFM - WooCommerce Multivendor Marketplace
|
1639 |
if ( class_exists( 'WCFMmp' ) ) {
|
1640 |
$selectors[] = '#wcfmmp-store .woocommerce-product-search';
|
192 |
add_action( 'wp_head', array( $this, 'orchid_store_wp_head' ) );
|
193 |
}
|
194 |
|
195 |
+
if ( 'Betheme' === $this->current_theme ) {
|
196 |
+
add_action( 'wp_head', array( $this, 'betheme_wp_head' ) );
|
197 |
+
}
|
198 |
+
|
199 |
+
if ( 'Gecko' === $this->current_theme ) {
|
200 |
+
add_action( 'wp_head', array( $this, 'gecko_wp_head' ) );
|
201 |
+
add_filter( 'aws_js_seamless_searchbox_markup', array( $this, 'gecko_seamless_searchbox_markup' ), 1 );
|
202 |
+
}
|
203 |
+
|
204 |
}
|
205 |
|
206 |
add_action( 'wp_head', array( $this, 'head_js_integration' ) );
|
1410 |
</style>
|
1411 |
<?php }
|
1412 |
|
1413 |
+
/*
|
1414 |
+
* Be theme search form styles
|
1415 |
+
*/
|
1416 |
+
public function betheme_wp_head() { ?>
|
1417 |
+
<style>
|
1418 |
+
#Header_wrapper #searchform {
|
1419 |
+
opacity: 0;
|
1420 |
+
}
|
1421 |
+
</style>
|
1422 |
+
<?php }
|
1423 |
+
|
1424 |
+
/*
|
1425 |
+
* Gecko theme search form
|
1426 |
+
*/
|
1427 |
+
public function gecko_wp_head() { ?>
|
1428 |
+
<style>
|
1429 |
+
#jas-wrapper .aws-container.header__search {
|
1430 |
+
height: 100%;
|
1431 |
+
width: 100%;
|
1432 |
+
top: 0;
|
1433 |
+
left: 0;
|
1434 |
+
background: rgba(0, 0, 0, .95);
|
1435 |
+
z-index: 9999;
|
1436 |
+
}
|
1437 |
+
#jas-wrapper .aws-container.header__search .aws-search-form {
|
1438 |
+
max-width: 550px;
|
1439 |
+
top: calc(50% - 125px);
|
1440 |
+
left: 50%;
|
1441 |
+
width: 100%;
|
1442 |
+
-webkit-transform: translateX(-50%);
|
1443 |
+
-moz-transform: translateX(-50%);
|
1444 |
+
-ms-transform: translateX(-50%);
|
1445 |
+
-o-transform: translateX(-50%);
|
1446 |
+
transform: translateX(-50%);
|
1447 |
+
}
|
1448 |
+
#jas-wrapper .aws-container.header__search .aws-search-form .aws-search-field {
|
1449 |
+
background: transparent;
|
1450 |
+
border: none;
|
1451 |
+
border-bottom: 1px solid rgba(255, 255, 255, .1);
|
1452 |
+
text-align: center;
|
1453 |
+
font-size: 18px;
|
1454 |
+
color: #fff;
|
1455 |
+
}
|
1456 |
+
</style>
|
1457 |
+
|
1458 |
+
<script>
|
1459 |
+
window.addEventListener('load', function() {
|
1460 |
+
if ( typeof jQuery !== 'undefined' ) {
|
1461 |
+
jQuery(document).on( 'click', '#jas-header .sf-open, #sf-close', function () {
|
1462 |
+
jQuery('.aws-container').toggleClass('dn');
|
1463 |
+
jQuery('.aws-search-result').hide();
|
1464 |
+
jQuery('.aws-container.header__search .aws-search-field:visible').focus();
|
1465 |
+
} );
|
1466 |
+
}
|
1467 |
+
function aws_results_layout( styles, options ) {
|
1468 |
+
var form = options.form;
|
1469 |
+
var realForm = form.closest('#jas-wrapper').find('.aws-container.header__search .aws-search-form');
|
1470 |
+
if ( options.form.closest('#jas-wrapper').length > 0 && jQuery('.aws-container.header__search').is(':visible') ) {
|
1471 |
+
var offset = parseInt( realForm.css('top') );
|
1472 |
+
var offsetLeft = parseInt( realForm.css('left') );
|
1473 |
+
var bodyOffset = jQuery('body').offset();
|
1474 |
+
styles.top = offset + form.find('.aws-search-field').innerHeight();
|
1475 |
+
styles.width = realForm.outerWidth();
|
1476 |
+
styles.left = offsetLeft - realForm.outerWidth() / 2;
|
1477 |
+
}
|
1478 |
+
return styles;
|
1479 |
+
}
|
1480 |
+
AwsHooks.add_filter( "aws_results_layout", aws_results_layout );
|
1481 |
+
}, false);
|
1482 |
+
</script>
|
1483 |
+
|
1484 |
+
<?php }
|
1485 |
+
|
1486 |
+
/*
|
1487 |
+
* Gecko theme markup for seamless js integration
|
1488 |
+
*/
|
1489 |
+
public function gecko_seamless_searchbox_markup( $markup ) {
|
1490 |
+
$markup = str_replace( 'aws-container', 'aws-container header__search w__100 dn pf', $markup );
|
1491 |
+
$markup = str_replace( '</form>', '</form><a id="sf-close" class="pa" href="#"><i class="pe-7s-close"></i></a>', $markup );
|
1492 |
+
return $markup;
|
1493 |
+
}
|
1494 |
+
|
1495 |
/*
|
1496 |
* Exclude product categories
|
1497 |
*/
|
1726 |
$selectors[] = '.basel-search-wrapper #searchform, .secondary-header #searchform, .mobile-nav #searchform';
|
1727 |
}
|
1728 |
|
1729 |
+
if ( 'Betheme' === $this->current_theme ) {
|
1730 |
+
$selectors[] = '#Header_wrapper #searchform';
|
1731 |
+
}
|
1732 |
+
|
1733 |
+
if ( 'Gecko' === $this->current_theme ) {
|
1734 |
+
$selectors[] = '#jas-wrapper .header__search';
|
1735 |
+
}
|
1736 |
+
|
1737 |
// WCFM - WooCommerce Multivendor Marketplace
|
1738 |
if ( class_exists( 'WCFMmp' ) ) {
|
1739 |
$selectors[] = '#wcfmmp-store .woocommerce-product-search';
|
includes/class-aws-search.php
CHANGED
@@ -98,7 +98,7 @@ if ( ! class_exists( 'AWS_Search' ) ) :
|
|
98 |
|
99 |
$cache = AWS()->get_settings( 'cache' );
|
100 |
|
101 |
-
$s = $keyword ? esc_attr( $keyword ) : esc_attr( $_POST['keyword'] );
|
102 |
$s = htmlspecialchars_decode( $s );
|
103 |
|
104 |
$this->data['s_nonormalize'] = $s;
|
@@ -589,14 +589,12 @@ if ( ! class_exists( 'AWS_Search' ) ) :
|
|
589 |
|
590 |
if ( $marked_content ) {
|
591 |
$excerpt = $marked_content;
|
592 |
-
} else {
|
593 |
-
$excerpt = wp_trim_words( $excerpt, $excerpt_length, '...' );
|
594 |
}
|
595 |
|
596 |
-
} else {
|
597 |
-
$excerpt = wp_trim_words( $excerpt, $excerpt_length, '...' );
|
598 |
}
|
599 |
|
|
|
|
|
600 |
}
|
601 |
|
602 |
if ( $show_price === 'true' && ( $product->is_in_stock() || ( ! $product->is_in_stock() && $show_outofstockprice === 'true' ) ) ) {
|
@@ -639,12 +637,12 @@ if ( ! class_exists( 'AWS_Search' ) ) :
|
|
639 |
if ( $product->is_in_stock() ) {
|
640 |
$stock_status = array(
|
641 |
'status' => true,
|
642 |
-
'text' => esc_html__( 'In stock', '
|
643 |
);
|
644 |
} else {
|
645 |
$stock_status = array(
|
646 |
'status' => false,
|
647 |
-
'text' => esc_html__( 'Out of stock', '
|
648 |
);
|
649 |
}
|
650 |
}
|
98 |
|
99 |
$cache = AWS()->get_settings( 'cache' );
|
100 |
|
101 |
+
$s = $keyword ? esc_attr( $keyword ) : ( isset( $_POST['keyword'] ) ? esc_attr( $_POST['keyword'] ) : '' );
|
102 |
$s = htmlspecialchars_decode( $s );
|
103 |
|
104 |
$this->data['s_nonormalize'] = $s;
|
589 |
|
590 |
if ( $marked_content ) {
|
591 |
$excerpt = $marked_content;
|
|
|
|
|
592 |
}
|
593 |
|
|
|
|
|
594 |
}
|
595 |
|
596 |
+
$excerpt = wp_trim_words( $excerpt, $excerpt_length, '...' );
|
597 |
+
|
598 |
}
|
599 |
|
600 |
if ( $show_price === 'true' && ( $product->is_in_stock() || ( ! $product->is_in_stock() && $show_outofstockprice === 'true' ) ) ) {
|
637 |
if ( $product->is_in_stock() ) {
|
638 |
$stock_status = array(
|
639 |
'status' => true,
|
640 |
+
'text' => esc_html__( 'In stock', 'woocommerce' )
|
641 |
);
|
642 |
} else {
|
643 |
$stock_status = array(
|
644 |
'status' => false,
|
645 |
+
'text' => esc_html__( 'Out of stock', 'woocommerce' )
|
646 |
);
|
647 |
}
|
648 |
}
|
includes/modules/elementor-widget/class-elementor-aws-widget.php
CHANGED
@@ -63,7 +63,7 @@ class Elementor_AWS_Widget extends \Elementor\Widget_Base {
|
|
63 |
* @since 1.0.0
|
64 |
* @access protected
|
65 |
*/
|
66 |
-
protected function
|
67 |
|
68 |
$this->start_controls_section(
|
69 |
'content_section',
|
63 |
* @since 1.0.0
|
64 |
* @access protected
|
65 |
*/
|
66 |
+
protected function register_controls() {
|
67 |
|
68 |
$this->start_controls_section(
|
69 |
'content_section',
|
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -167,6 +167,17 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
|
|
167 |
|
168 |
== Changelog ==
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
= 2.53 ( 2022-04-25 ) =
|
171 |
* Update - Tested with WC 6.4
|
172 |
* Update - Support for Avada theme and Avada 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: 6.0
|
7 |
+
Stable tag: 2.54
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
167 |
|
168 |
== Changelog ==
|
169 |
|
170 |
+
= 2.54 ( 2022-05-16 ) =
|
171 |
+
* Add - Support for Gecko theme
|
172 |
+
* Update - Tested with WC 6.5
|
173 |
+
* Update - Admin page integration notices
|
174 |
+
* Update - Support for Be theme
|
175 |
+
* Fix - Translations for stock statuses inside search results
|
176 |
+
* Fix - Error notice for Elementor plugin search module
|
177 |
+
* Fix - Php error notice about default options values
|
178 |
+
* Fix - Length of products search results descriptions
|
179 |
+
* Dev - Fix error with empty search query for results page
|
180 |
+
|
181 |
= 2.53 ( 2022-04-25 ) =
|
182 |
* Update - Tested with WC 6.4
|
183 |
* Update - Support for Avada theme and Avada Builder
|