Version Description
- Fix shortcodes stripping from product content
- Fix qTranslate plugin issue with product name
- Fix reindex issue
Download this release
Release Info
Developer | Mihail Barinov |
Plugin | Advanced Woo Search |
Version | 1.32 |
Comparing to | |
See all releases |
Code changes from version 1.31 to 1.32
- advanced-woo-search.php +2 -2
- assets/js/admin.js +2 -2
- includes/class-aws-table.php +18 -2
- readme.txt +8 -3
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: aws
|
@@ -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.32
|
7 |
Author: ILLID
|
8 |
Author URI: https://advanced-woo-search.com/
|
9 |
Text Domain: aws
|
16 |
exit;
|
17 |
}
|
18 |
|
19 |
+
define( 'AWS_VERSION', '1.32' );
|
20 |
|
21 |
|
22 |
define( 'AWS_DIR', dirname( __FILE__ ) );
|
assets/js/admin.js
CHANGED
@@ -33,7 +33,7 @@ jQuery(document).ready(function ($) {
|
|
33 |
|
34 |
$.ajax({
|
35 |
type: 'POST',
|
36 |
-
url:
|
37 |
data: {
|
38 |
action: 'aws-reindex'
|
39 |
},
|
@@ -105,7 +105,7 @@ jQuery(document).ready(function ($) {
|
|
105 |
|
106 |
$.ajax({
|
107 |
type: 'POST',
|
108 |
-
url:
|
109 |
data: {
|
110 |
action: 'aws-clear-cache'
|
111 |
},
|
33 |
|
34 |
$.ajax({
|
35 |
type: 'POST',
|
36 |
+
url: ajaxurl,
|
37 |
data: {
|
38 |
action: 'aws-reindex'
|
39 |
},
|
105 |
|
106 |
$.ajax({
|
107 |
type: 'POST',
|
108 |
+
url: ajaxurl,
|
109 |
data: {
|
110 |
action: 'aws-clear-cache'
|
111 |
},
|
includes/class-aws-table.php
CHANGED
@@ -268,6 +268,7 @@ if ( ! class_exists( 'AWS_Table' ) ) :
|
|
268 |
$content = apply_filters( 'the_content', get_post_field( 'post_content', $data['id'] ) );
|
269 |
$excerpt = get_post_field( 'post_excerpt', $data['id'] );
|
270 |
|
|
|
271 |
$cat_names = $this->get_terms_names_list( $data['id'], 'product_cat' );
|
272 |
$tag_names = $this->get_terms_names_list( $data['id'], 'product_tag' );
|
273 |
|
@@ -308,8 +309,8 @@ if ( ! class_exists( 'AWS_Table' ) ) :
|
|
308 |
$content = wp_encode_emoji( $content );
|
309 |
}
|
310 |
|
311 |
-
$content = strip_shortcodes( $content );
|
312 |
-
|
313 |
|
314 |
$data['terms']['title'] = $this->extract_terms( $title );
|
315 |
$data['terms']['content'] = $this->extract_terms( $content );
|
@@ -344,6 +345,8 @@ if ( ! class_exists( 'AWS_Table' ) ) :
|
|
344 |
$translated_content = apply_filters( 'the_content', get_post_field( 'post_content', $translated_post->ID ) );
|
345 |
$translated_excerpt = get_post_field( 'post_excerpt', $translated_post->ID );
|
346 |
|
|
|
|
|
347 |
|
348 |
$translated_post_data['terms']['title'] = $this->extract_terms( $translated_title );
|
349 |
$translated_post_data['terms']['content'] = $this->extract_terms( $translated_content );
|
@@ -370,6 +373,8 @@ if ( ! class_exists( 'AWS_Table' ) ) :
|
|
370 |
foreach( $enabled_languages as $current_lang ) {
|
371 |
|
372 |
if ( $current_lang == $lang ) {
|
|
|
|
|
373 |
continue;
|
374 |
}
|
375 |
|
@@ -388,6 +393,9 @@ if ( ! class_exists( 'AWS_Table' ) ) :
|
|
388 |
$translated_content = qtranxf_use( $current_lang, $product->get_description(), true, true );
|
389 |
$translated_excerpt = qtranxf_use( $current_lang, $product->get_short_description(), true, true );
|
390 |
|
|
|
|
|
|
|
391 |
$translated_post_data['terms']['title'] = $this->extract_terms( $translated_title );
|
392 |
$translated_post_data['terms']['content'] = $this->extract_terms( $translated_content );
|
393 |
$translated_post_data['terms']['excerpt'] = $this->extract_terms( $translated_excerpt );
|
@@ -553,6 +561,14 @@ if ( ! class_exists( 'AWS_Table' ) ) :
|
|
553 |
wp_send_json_success( 'Deleted!' );
|
554 |
}
|
555 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
556 |
/*
|
557 |
* Extract terms from content
|
558 |
*/
|
268 |
$content = apply_filters( 'the_content', get_post_field( 'post_content', $data['id'] ) );
|
269 |
$excerpt = get_post_field( 'post_excerpt', $data['id'] );
|
270 |
|
271 |
+
|
272 |
$cat_names = $this->get_terms_names_list( $data['id'], 'product_cat' );
|
273 |
$tag_names = $this->get_terms_names_list( $data['id'], 'product_tag' );
|
274 |
|
309 |
$content = wp_encode_emoji( $content );
|
310 |
}
|
311 |
|
312 |
+
$content = $this->strip_shortcodes( $content );
|
313 |
+
$excerpt = $this->strip_shortcodes( $excerpt );
|
314 |
|
315 |
$data['terms']['title'] = $this->extract_terms( $title );
|
316 |
$data['terms']['content'] = $this->extract_terms( $content );
|
345 |
$translated_content = apply_filters( 'the_content', get_post_field( 'post_content', $translated_post->ID ) );
|
346 |
$translated_excerpt = get_post_field( 'post_excerpt', $translated_post->ID );
|
347 |
|
348 |
+
$translated_content = $this->strip_shortcodes( $translated_content );
|
349 |
+
$translated_excerpt = $this->strip_shortcodes( $translated_excerpt );
|
350 |
|
351 |
$translated_post_data['terms']['title'] = $this->extract_terms( $translated_title );
|
352 |
$translated_post_data['terms']['content'] = $this->extract_terms( $translated_content );
|
373 |
foreach( $enabled_languages as $current_lang ) {
|
374 |
|
375 |
if ( $current_lang == $lang ) {
|
376 |
+
$default_lang_title = qtranxf_use( $current_lang, $product->get_name(), true, true );
|
377 |
+
$data['terms']['title'] = $this->extract_terms( $default_lang_title );
|
378 |
continue;
|
379 |
}
|
380 |
|
393 |
$translated_content = qtranxf_use( $current_lang, $product->get_description(), true, true );
|
394 |
$translated_excerpt = qtranxf_use( $current_lang, $product->get_short_description(), true, true );
|
395 |
|
396 |
+
$translated_content = $this->strip_shortcodes( $translated_content );
|
397 |
+
$translated_excerpt = $this->strip_shortcodes( $translated_excerpt );
|
398 |
+
|
399 |
$translated_post_data['terms']['title'] = $this->extract_terms( $translated_title );
|
400 |
$translated_post_data['terms']['content'] = $this->extract_terms( $translated_content );
|
401 |
$translated_post_data['terms']['excerpt'] = $this->extract_terms( $translated_excerpt );
|
561 |
wp_send_json_success( 'Deleted!' );
|
562 |
}
|
563 |
|
564 |
+
/*
|
565 |
+
* Strip shortcodes
|
566 |
+
*/
|
567 |
+
private function strip_shortcodes( $content ) {
|
568 |
+
$content = preg_replace( '#\[[^\]]+\]#', '', $content );
|
569 |
+
return $content;
|
570 |
+
}
|
571 |
+
|
572 |
/*
|
573 |
* Extract terms from content
|
574 |
*/
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Mihail Barinov
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GSE37FC4Y7CEY
|
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: 4.9
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -37,7 +37,7 @@ Advanced Woo Search - powerful live search plugin for WooCommerce. Just start ty
|
|
37 |
* Search **results layouts**
|
38 |
* **Filters**. Switch between tabs to show different search results
|
39 |
* **Unlimited** amount of search form instances
|
40 |
-
* **
|
41 |
* **Exclude** spicific products by its categories or tags from search results
|
42 |
* Ability to specify **source of image** for search results: featured image, gallery, product content, product short description or set default image if there is no other images
|
43 |
* **Visibility option** - choose what catalog visibility must be for product to displayed in search results
|
@@ -75,6 +75,11 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
|
|
75 |
|
76 |
== Changelog ==
|
77 |
|
|
|
|
|
|
|
|
|
|
|
78 |
= 1.31 =
|
79 |
* Add WooCommerce version check
|
80 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GSE37FC4Y7CEY
|
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: 4.9.1
|
7 |
+
Stable tag: 1.32
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
37 |
* Search **results layouts**
|
38 |
* **Filters**. Switch between tabs to show different search results
|
39 |
* **Unlimited** amount of search form instances
|
40 |
+
* **Advanced settings page** with lot of options
|
41 |
* **Exclude** spicific products by its categories or tags from search results
|
42 |
* Ability to specify **source of image** for search results: featured image, gallery, product content, product short description or set default image if there is no other images
|
43 |
* **Visibility option** - choose what catalog visibility must be for product to displayed in search results
|
75 |
|
76 |
== Changelog ==
|
77 |
|
78 |
+
= 1.32 =
|
79 |
+
* Fix shortcodes stripping from product content
|
80 |
+
* Fix qTranslate plugin issue with product name
|
81 |
+
* Fix reindex issue
|
82 |
+
|
83 |
= 1.31 =
|
84 |
* Add WooCommerce version check
|
85 |
|