Version Description
( 2021-12-20 ) = * Add - Support for Orchid Store theme * Update - Tested with WC 6.0 * Update - Integration for Product Visibility by User Role for WooCommerce plugin * Update - Admin page notices display * Update - Support for Basel theme
Download this release
Release Info
Developer | Mihail Barinov |
Plugin | Advanced Woo Search |
Version | 2.43 |
Comparing to | |
See all releases |
Code changes from version 2.42 to 2.43
- advanced-woo-search.php +3 -3
- includes/admin/class-aws-admin.php +4 -0
- includes/class-aws-integrations.php +44 -3
- readme.txt +8 -1
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:
|
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.43
|
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.0.0
|
12 |
*/
|
13 |
|
14 |
|
96 |
*/
|
97 |
private function define_constants() {
|
98 |
|
99 |
+
$this->define( 'AWS_VERSION', '2.43' );
|
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.php
CHANGED
@@ -236,6 +236,10 @@ class AWS_Admin {
|
|
236 |
return;
|
237 |
}
|
238 |
|
|
|
|
|
|
|
|
|
239 |
$hide_notice = get_option( 'aws_hide_welcome_notice' );
|
240 |
|
241 |
if ( ! $hide_notice || $hide_notice === 'true' ) {
|
236 |
return;
|
237 |
}
|
238 |
|
239 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
240 |
+
return;
|
241 |
+
}
|
242 |
+
|
243 |
$hide_notice = get_option( 'aws_hide_welcome_notice' );
|
244 |
|
245 |
if ( ! $hide_notice || $hide_notice === 'true' ) {
|
includes/class-aws-integrations.php
CHANGED
@@ -197,6 +197,10 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
197 |
add_action( 'wp_head', array( $this, 'rey_wp_head' ) );
|
198 |
}
|
199 |
|
|
|
|
|
|
|
|
|
200 |
}
|
201 |
|
202 |
add_action( 'wp_head', array( $this, 'head_js_integration' ) );
|
@@ -1472,6 +1476,31 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
1472 |
|
1473 |
<?php }
|
1474 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1475 |
/*
|
1476 |
* Exclude product categories
|
1477 |
*/
|
@@ -1673,7 +1702,7 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
1673 |
}
|
1674 |
|
1675 |
if ( 'Basel' === $this->current_theme ) {
|
1676 |
-
$selectors[] = '.basel-search-wrapper #searchform, .secondary-header #searchform';
|
1677 |
}
|
1678 |
|
1679 |
// WCFM - WooCommerce Multivendor Marketplace
|
@@ -1981,6 +2010,8 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
1981 |
$user_role = $roles[0];
|
1982 |
}
|
1983 |
|
|
|
|
|
1984 |
foreach( $products as $key => $product ) {
|
1985 |
|
1986 |
$visible_roles = get_post_meta( $product['parent_id'], '_alg_wc_pvbur_visible', true );
|
@@ -1989,7 +2020,7 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
1989 |
if ( is_array( $invisible_roles ) && ! empty( $invisible_roles ) ) {
|
1990 |
foreach( $invisible_roles as $invisible_role ) {
|
1991 |
if ( $user_role == $invisible_role ) {
|
1992 |
-
|
1993 |
continue 2;
|
1994 |
}
|
1995 |
}
|
@@ -2004,13 +2035,23 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
2004 |
}
|
2005 |
}
|
2006 |
if ( ! $show ) {
|
2007 |
-
|
2008 |
continue;
|
2009 |
}
|
2010 |
}
|
2011 |
|
2012 |
}
|
2013 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014 |
return $products;
|
2015 |
|
2016 |
}
|
197 |
add_action( 'wp_head', array( $this, 'rey_wp_head' ) );
|
198 |
}
|
199 |
|
200 |
+
if ( 'Orchid Store' === $this->current_theme || function_exists('orchid_store_setup') ) {
|
201 |
+
add_action( 'wp_head', array( $this, 'orchid_store_wp_head' ) );
|
202 |
+
}
|
203 |
+
|
204 |
}
|
205 |
|
206 |
add_action( 'wp_head', array( $this, 'head_js_integration' ) );
|
1476 |
|
1477 |
<?php }
|
1478 |
|
1479 |
+
/*
|
1480 |
+
* Orchid store theme search form styles
|
1481 |
+
*/
|
1482 |
+
public function orchid_store_wp_head() { ?>
|
1483 |
+
<style>
|
1484 |
+
.masterheader .aws-container .aws-search-field {
|
1485 |
+
border: 2px solid #0286e7;
|
1486 |
+
border-radius: 50px !important;
|
1487 |
+
}
|
1488 |
+
.masterheader .aws-container .aws-search-form {
|
1489 |
+
height: 45px;
|
1490 |
+
}
|
1491 |
+
.masterheader .aws-container .aws-search-form .aws-form-btn {
|
1492 |
+
background: #0286e7;
|
1493 |
+
border-radius: 50px !important;
|
1494 |
+
margin: 3px 0;
|
1495 |
+
}
|
1496 |
+
.masterheader .aws-container .aws-search-form .aws-main-filter .aws-main-filter__current,
|
1497 |
+
.masterheader .aws-container .aws-search-form .aws-main-filter .aws-main-filter__current:after,
|
1498 |
+
.masterheader .aws-container .aws-search-form .aws-search-btn_icon {
|
1499 |
+
color: #fff;
|
1500 |
+
}
|
1501 |
+
</style>
|
1502 |
+
<?php }
|
1503 |
+
|
1504 |
/*
|
1505 |
* Exclude product categories
|
1506 |
*/
|
1702 |
}
|
1703 |
|
1704 |
if ( 'Basel' === $this->current_theme ) {
|
1705 |
+
$selectors[] = '.basel-search-wrapper #searchform, .secondary-header #searchform, .mobile-nav #searchform';
|
1706 |
}
|
1707 |
|
1708 |
// WCFM - WooCommerce Multivendor Marketplace
|
2010 |
$user_role = $roles[0];
|
2011 |
}
|
2012 |
|
2013 |
+
$remove_products = array();
|
2014 |
+
|
2015 |
foreach( $products as $key => $product ) {
|
2016 |
|
2017 |
$visible_roles = get_post_meta( $product['parent_id'], '_alg_wc_pvbur_visible', true );
|
2020 |
if ( is_array( $invisible_roles ) && ! empty( $invisible_roles ) ) {
|
2021 |
foreach( $invisible_roles as $invisible_role ) {
|
2022 |
if ( $user_role == $invisible_role ) {
|
2023 |
+
$remove_products[] = $key;
|
2024 |
continue 2;
|
2025 |
}
|
2026 |
}
|
2035 |
}
|
2036 |
}
|
2037 |
if ( ! $show ) {
|
2038 |
+
$remove_products[] = $key;
|
2039 |
continue;
|
2040 |
}
|
2041 |
}
|
2042 |
|
2043 |
}
|
2044 |
|
2045 |
+
if ( ! empty( $remove_products ) ) {
|
2046 |
+
$new_products = array();
|
2047 |
+
foreach( $products as $key => $product ) {
|
2048 |
+
if ( array_search( $key, $remove_products ) === false ) {
|
2049 |
+
$new_products[] = $product;
|
2050 |
+
}
|
2051 |
+
}
|
2052 |
+
$products = $new_products;
|
2053 |
+
}
|
2054 |
+
|
2055 |
return $products;
|
2056 |
|
2057 |
}
|
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.8
|
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,13 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
|
|
167 |
|
168 |
== Changelog ==
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
= 2.42 ( 2021-12-07 ) =
|
171 |
* Add - Support for Basel theme
|
172 |
* Add - Support for Rey theme
|
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.8
|
7 |
+
Stable tag: 2.43
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
167 |
|
168 |
== Changelog ==
|
169 |
|
170 |
+
= 2.43 ( 2021-12-20 ) =
|
171 |
+
* Add - Support for Orchid Store theme
|
172 |
+
* Update - Tested with WC 6.0
|
173 |
+
* Update - Integration for Product Visibility by User Role for WooCommerce plugin
|
174 |
+
* Update - Admin page notices display
|
175 |
+
* Update - Support for Basel theme
|
176 |
+
|
177 |
= 2.42 ( 2021-12-07 ) =
|
178 |
* Add - Support for Basel theme
|
179 |
* Add - Support for Rey theme
|