Version Description
- Released: Mar 31, 2017 = Fix: Query for visible product Update: Plugin Core
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Ajax Search |
Version | 1.5.2 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.5.2
- README.txt +6 -2
- class.yith-wcas.php +20 -8
- init.php +2 -2
- plugin-fw/init.php +1 -1
- plugin-fw/lib/yit-plugin-panel.php +1 -1
- plugin-fw/yit-woocommerce-compatibility.php +3 -1
README.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: yithemes
|
4 |
Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
|
5 |
Requires at least: 4.0.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -138,6 +138,10 @@ If you have created your own language pack for YITH WooCommerce Ajax Search, or
|
|
138 |
2. YITH WooCommerce Ajax Search in operation displaying WooCommerce search results
|
139 |
|
140 |
== Changelog ==
|
|
|
|
|
|
|
|
|
141 |
= 1.5.1 - Released: Mar 28, 2017 =
|
142 |
New: Support to WooCommerce 3.0 RC 2
|
143 |
Update: Plugin Core
|
3 |
Contributors: yithemes
|
4 |
Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
|
5 |
Requires at least: 4.0.0
|
6 |
+
Tested up to: 4.7.3
|
7 |
+
Stable tag: 1.5.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
138 |
2. YITH WooCommerce Ajax Search in operation displaying WooCommerce search results
|
139 |
|
140 |
== Changelog ==
|
141 |
+
= 1.5.2 - Released: Mar 31, 2017 =
|
142 |
+
Fix: Query for visible product
|
143 |
+
Update: Plugin Core
|
144 |
+
|
145 |
= 1.5.1 - Released: Mar 28, 2017 =
|
146 |
New: Support to WooCommerce 3.0 RC 2
|
147 |
Update: Plugin Core
|
class.yith-wcas.php
CHANGED
@@ -142,14 +142,7 @@ if ( !class_exists( 'YITH_WCAS' ) ) {
|
|
142 |
'orderby' => $ordering_args['orderby'],
|
143 |
'order' => $ordering_args['order'],
|
144 |
'posts_per_page' => apply_filters( 'yith_wcas_ajax_search_products_posts_per_page', get_option( 'yith_wcas_posts_per_page' ) ),
|
145 |
-
'suppress_filters' => false
|
146 |
-
'meta_query' => array(
|
147 |
-
array(
|
148 |
-
'key' => '_visibility',
|
149 |
-
'value' => array( 'search', 'visible' ),
|
150 |
-
'compare' => 'IN'
|
151 |
-
)
|
152 |
-
)
|
153 |
);
|
154 |
|
155 |
if ( isset( $_REQUEST['product_cat'] ) ) {
|
@@ -163,6 +156,25 @@ if ( !class_exists( 'YITH_WCAS' ) ) {
|
|
163 |
);
|
164 |
}
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
$products = get_posts( $args );
|
167 |
|
168 |
if ( ! empty( $products ) ) {
|
142 |
'orderby' => $ordering_args['orderby'],
|
143 |
'order' => $ordering_args['order'],
|
144 |
'posts_per_page' => apply_filters( 'yith_wcas_ajax_search_products_posts_per_page', get_option( 'yith_wcas_posts_per_page' ) ),
|
145 |
+
'suppress_filters' => false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
);
|
147 |
|
148 |
if ( isset( $_REQUEST['product_cat'] ) ) {
|
156 |
);
|
157 |
}
|
158 |
|
159 |
+
if ( version_compare( WC()->version, '2.7.0', '<' ) ) {
|
160 |
+
$args['meta_query'] = array(
|
161 |
+
array(
|
162 |
+
'key' => '_visibility',
|
163 |
+
'value' => array( 'search', 'visible' ),
|
164 |
+
'compare' => 'IN'
|
165 |
+
),
|
166 |
+
);
|
167 |
+
}else{
|
168 |
+
$product_visibility_term_ids = wc_get_product_visibility_term_ids();
|
169 |
+
$args['tax_query'][] = array(
|
170 |
+
'taxonomy' => 'product_visibility',
|
171 |
+
'field' => 'term_taxonomy_id',
|
172 |
+
'terms' => $product_visibility_term_ids['exclude-from-search'],
|
173 |
+
'operator' => 'NOT IN',
|
174 |
+
);
|
175 |
+
}
|
176 |
+
|
177 |
+
|
178 |
$products = get_posts( $args );
|
179 |
|
180 |
if ( ! empty( $products ) ) {
|
init.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Ajax Search
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Ajax Search allows your users to search products in real time.
|
6 |
-
* Version: 1.5.
|
7 |
* Author: YITHEMES
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-ajax-search
|
@@ -65,7 +65,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
|
|
65 |
if ( defined( 'YITH_WCAS_VERSION' ) ){
|
66 |
return;
|
67 |
}else{
|
68 |
-
define( 'YITH_WCAS_VERSION', '1.5.
|
69 |
}
|
70 |
|
71 |
if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
|
3 |
* Plugin Name: YITH WooCommerce Ajax Search
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Ajax Search allows your users to search products in real time.
|
6 |
+
* Version: 1.5.2
|
7 |
* Author: YITHEMES
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-ajax-search
|
65 |
if ( defined( 'YITH_WCAS_VERSION' ) ){
|
66 |
return;
|
67 |
}else{
|
68 |
+
define( 'YITH_WCAS_VERSION', '1.5.2' );
|
69 |
}
|
70 |
|
71 |
if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
|
plugin-fw/init.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Framework Name: YIT Plugin Framework
|
4 |
-
* Version: 2.9.
|
5 |
* Author: Yithemes
|
6 |
* Text Domain: yith-plugin-fw
|
7 |
* Domain Path: /languages/
|
1 |
<?php
|
2 |
/**
|
3 |
* Framework Name: YIT Plugin Framework
|
4 |
+
* Version: 2.9.62
|
5 |
* Author: Yithemes
|
6 |
* Text Domain: yith-plugin-fw
|
7 |
* Domain Path: /languages/
|
plugin-fw/lib/yit-plugin-panel.php
CHANGED
@@ -114,7 +114,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
114 |
if( ! isset( $admin_page_hooks['yit_plugin_panel'] ) ){
|
115 |
$position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
|
116 |
// YITH Plugins text must not be translated
|
117 |
-
|
118 |
}
|
119 |
}
|
120 |
|
114 |
if( ! isset( $admin_page_hooks['yit_plugin_panel'] ) ){
|
115 |
$position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
|
116 |
// YITH Plugins text must not be translated
|
117 |
+
apply_filters('yit_plugin_panel_menu_page_capability', current_user_can( 'manage_options' )) && add_menu_page( 'yit_plugin_panel', 'YITH Plugins', 'manage_options', 'yit_plugin_panel', NULL, YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png', $position );
|
118 |
}
|
119 |
}
|
120 |
|
plugin-fw/yit-woocommerce-compatibility.php
CHANGED
@@ -179,6 +179,8 @@ if ( !function_exists( 'yit_return_new_attribute_map' ) ) {
|
|
179 |
'_order_date' => '_date_created',
|
180 |
'order_date' => 'date_created',
|
181 |
'order_total' => 'total',
|
|
|
|
|
182 |
/* Products */
|
183 |
'visibility' => 'catalog_visibility',
|
184 |
'_visibility' => '_catalog_visibility',
|
@@ -686,7 +688,7 @@ if ( !function_exists( 'yit_datetime_to_timestamp' ) ) {
|
|
686 |
*/
|
687 |
function yit_datetime_to_timestamp( $date ) {
|
688 |
|
689 |
-
if (
|
690 |
$date = strtotime( $date );
|
691 |
}
|
692 |
|
179 |
'_order_date' => '_date_created',
|
180 |
'order_date' => 'date_created',
|
181 |
'order_total' => 'total',
|
182 |
+
'customer_user' => 'customer_id',
|
183 |
+
'_customer_user' => 'customer_id',
|
184 |
/* Products */
|
185 |
'visibility' => 'catalog_visibility',
|
186 |
'_visibility' => '_catalog_visibility',
|
688 |
*/
|
689 |
function yit_datetime_to_timestamp( $date ) {
|
690 |
|
691 |
+
if ( ! is_int( $date ) ) {
|
692 |
$date = strtotime( $date );
|
693 |
}
|
694 |
|