Advanced Woo Search - Version 1.47

Version Description

  • Add seamless integration option
  • Fix styling
Download this release

Release Info

Developer Mihail Barinov
Plugin Icon 128x128 Advanced Woo Search
Version 1.47
Comparing to
See all releases

Code changes from version 1.46 to 1.47

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.46
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.46' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
@@ -89,6 +89,11 @@ final class AWS_Main {
89
 
90
  add_filter( 'wcml_multi_currency_ajax_actions', array( $this, 'add_wpml_ajax_actions' ) );
91
 
 
 
 
 
 
92
  }
93
 
94
  /**
@@ -249,4 +254,33 @@ function aws_install_woocommerce_admin_notice() {
249
  */
250
  function aws_init() {
251
  AWS();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  }
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 1.47
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: aws
16
  exit;
17
  }
18
 
19
+ define( 'AWS_VERSION', '1.47' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
89
 
90
  add_filter( 'wcml_multi_currency_ajax_actions', array( $this, 'add_wpml_ajax_actions' ) );
91
 
92
+ if ( $this->get_settings('seamless') === 'true' ) {
93
+ add_filter( 'get_search_form', array( $this, 'markup' ) );
94
+ add_filter( 'get_product_search_form', array( $this, 'markup' ) );
95
+ }
96
+
97
  }
98
 
99
  /**
254
  */
255
  function aws_init() {
256
  AWS();
257
+ }
258
+
259
+
260
+ if ( ! function_exists( 'aws_get_search_form' ) ) {
261
+
262
+ /**
263
+ * Returns search form html
264
+ *
265
+ * @since 1.47
266
+ * @return string
267
+ */
268
+ function aws_get_search_form( $echo = true, $args = array() ) {
269
+
270
+ $form = '';
271
+
272
+ if ( ! aws_is_plugin_active( 'advanced-woo-search-pro/advanced-woo-search-pro.php' ) ) {
273
+ if ( aws_is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
274
+ $form = AWS()->markup( $args );
275
+ }
276
+ }
277
+
278
+ if ( $echo ) {
279
+ echo $form;
280
+ } else {
281
+ return $form;
282
+ }
283
+
284
+ }
285
+
286
  }
assets/css/admin.css CHANGED
@@ -99,6 +99,16 @@
99
  padding-bottom: 4px;
100
  }
101
 
 
 
 
 
 
 
 
 
 
 
102
 
103
  h1.aws-instance-name {
104
  position: relative;
99
  padding-bottom: 4px;
100
  }
101
 
102
+ #aws_form .description.activation {
103
+ font-size: 14px;
104
+ line-height: 1.5;
105
+ font-style: normal;
106
+ }
107
+
108
+ #aws_form .description.activation .list {
109
+ padding-top: 2px;
110
+ }
111
+
112
 
113
  h1.aws-instance-name {
114
  position: relative;
assets/css/common.css CHANGED
@@ -1,6 +1,7 @@
1
  .aws-container .aws-search-form {
2
  position: relative;
3
  width: 100%;
 
4
  }
5
 
6
  .aws-container .aws-search-form * {
@@ -107,7 +108,7 @@
107
  padding: 0;
108
  margin: 0 !important;
109
 
110
- max-height: 300px;
111
  overflow-y: auto;
112
  }
113
 
1
  .aws-container .aws-search-form {
2
  position: relative;
3
  width: 100%;
4
+ float: none !important;
5
  }
6
 
7
  .aws-container .aws-search-form * {
108
  padding: 0;
109
  margin: 0 !important;
110
 
111
+ max-height: 400px;
112
  overflow-y: auto;
113
  }
114
 
includes/class-aws-admin.php CHANGED
@@ -132,7 +132,6 @@ class AWS_Admin {
132
  echo '<h1></h1>';
133
 
134
  echo '<h1 class="aws-instance-name">Advanced Woo Search</h1>';
135
- echo '<div class="aws-instance-shortcode">[aws_search_form]</div>';
136
 
137
  echo $tabs_html;
138
 
@@ -380,6 +379,27 @@ class AWS_Admin {
380
  */
381
  private function update_table() {
382
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
383
  echo '<tr>';
384
 
385
  echo '<th>' . __( 'Reindex table', 'aws' ) . '</th>';
132
  echo '<h1></h1>';
133
 
134
  echo '<h1 class="aws-instance-name">Advanced Woo Search</h1>';
 
135
 
136
  echo $tabs_html;
137
 
379
  */
380
  private function update_table() {
381
 
382
+
383
+ echo '<tr>';
384
+
385
+ echo '<th>' . __( 'Activation', 'aws' ) . '</th>';
386
+ echo '<td>';
387
+ echo '<div class="description activation">';
388
+ echo __( 'In case you need to add plugin search form on your website, you can do it in several ways:', 'aws' ) . '<br>';
389
+ echo '<div class="list">';
390
+ echo '1. ' . __( 'Enable a "Seamless integration" option ( may not work with some themes )', 'aws' ) . '<br>';
391
+ echo '2. ' . sprintf( __( 'Add search form using shortcode %s', 'aws' ), "<code>[aws_search_form]</code>" ) . '<br>';
392
+ echo '3. ' . __( 'Add search form as widget for one of your theme widget areas. Go to Appearance -> Widgets and drag&drop AWS Widget to one of your widget areas', 'aws' ) . '<br>';
393
+ echo '4. ' . sprintf( __( 'Add PHP code to the necessary files of your theme: %s', 'aws' ), "<code>&lt;?php if ( function_exists( 'aws_get_search_form' ) ) { aws_get_search_form(); } ?&gt;</code>" ) . '<br>';
394
+ echo '</div>';
395
+ echo '</div>';
396
+ echo '</td>';
397
+
398
+ echo '</tr>';
399
+
400
+
401
+
402
+
403
  echo '<tr>';
404
 
405
  echo '<th>' . __( 'Reindex table', 'aws' ) . '</th>';
includes/class-aws-versions.php CHANGED
@@ -163,6 +163,19 @@ if ( ! class_exists( 'AWS_Versions' ) ) :
163
 
164
  }
165
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  }
167
 
168
  update_option( 'aws_plugin_ver', AWS_VERSION );
163
 
164
  }
165
 
166
+ if ( version_compare( $current_version, '1.47', '<' ) ) {
167
+
168
+ $settings = get_option( 'aws_settings' );
169
+
170
+ if ( $settings ) {
171
+ if ( ! isset( $settings['seamless'] ) ) {
172
+ $settings['seamless'] = 'false';
173
+ update_option( 'aws_settings', $settings );
174
+ }
175
+ }
176
+
177
+ }
178
+
179
  }
180
 
181
  update_option( 'aws_plugin_ver', AWS_VERSION );
includes/options.php CHANGED
@@ -5,6 +5,23 @@
5
 
6
  $options = array();
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  $options['general'][] = array(
9
  "name" => __( "Cache results", "aws" ),
10
  "desc" => __( "Turn off if you have old data in the search results after content of products was changed.<br><strong>CAUTION:</strong> can dramatically increase search speed", "aws" ),
5
 
6
  $options = array();
7
 
8
+ $options['general'][] = array(
9
+ "name" => __( "Main Settings", "aws" ),
10
+ "type" => "heading"
11
+ );
12
+
13
+ $options['general'][] = array(
14
+ "name" => __( "Seamless integration", "aws" ),
15
+ "desc" => __( "Replace all the standard search forms on your website ( may not work with some themes ).", "aws" ),
16
+ "id" => "seamless",
17
+ "value" => 'false',
18
+ "type" => "radio",
19
+ 'choices' => array(
20
+ 'true' => __( 'On', 'aws' ),
21
+ 'false' => __( 'Off', 'aws' ),
22
+ )
23
+ );
24
+
25
  $options['general'][] = array(
26
  "name" => __( "Cache results", "aws" ),
27
  "desc" => __( "Turn off if you have old data in the search results after content of products was changed.<br><strong>CAUTION:</strong> can dramatically increase search speed", "aws" ),
languages/aws.pot CHANGED
@@ -128,6 +128,33 @@ msgstr ""
128
  msgid "Cache results"
129
  msgstr ""
130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  #: includes/options.php:10
132
  msgid ""
133
  "Turn off if you have old data in the search results after content of "
128
  msgid "Cache results"
129
  msgstr ""
130
 
131
+ msgid "Main Settings"
132
+ msgstr ""
133
+
134
+ msgid "Seamless integration"
135
+ msgstr ""
136
+
137
+ msgid "Replace all the standard search forms on your website ( may not work with some themes )."
138
+ msgstr ""
139
+
140
+ msgid "Activation"
141
+ msgstr ""
142
+
143
+ msgid "In case you need to add plugin search form on your website, you can do it in several ways:"
144
+ msgstr ""
145
+
146
+ msgid "Enable a \"Seamless integration\" option ( may not work with some themes )"
147
+ msgstr ""
148
+
149
+ msgid "Add search form using shortcode %s"
150
+ msgstr ""
151
+
152
+ msgid "Add search form as widget for one of your theme widget areas. Go to Appearance -> Widgets and drag&drop AWS Widget to one of your widget areas"
153
+ msgstr ""
154
+
155
+ msgid "Add PHP code to the necessary files of your theme: %s"
156
+ msgstr ""
157
+
158
  #: includes/options.php:10
159
  msgid ""
160
  "Turn off if you have old data in the search results after content of "
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: 4.9.7
7
- Stable tag: 1.46
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,12 +12,12 @@ Advanced AJAX search plugin for WooCommerce
12
 
13
  == Description ==
14
 
15
- Advanced Woo Search - powerful live search plugin for WooCommerce. Just start typing and you will immediately see the products that you search
16
 
17
  = Main Features =
18
 
19
  * **Products search** - Search across all your WooCommerce products
20
- * **Search in** - Search in product title, content, excerpt, categories, tags and sku. Or just in some of them
21
  * **Settings page** - User-friendly settings page with lot of options
22
  * **Shortcode** and **widget** - Use shortcode and widget to place search box anywhere you want
23
  * **Product image** - Each search result contains product image
@@ -96,6 +96,10 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
96
 
97
  == Changelog ==
98
 
 
 
 
 
99
  = 1.46 =
100
  * Add support for WPML plugin multi currency
101
  * Fix css styles
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
7
+ Stable tag: 1.47
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ Advanced Woo Search - powerful live search plugin for WooCommerce. Just start typing and you will immediately see the products that you search.
16
 
17
  = Main Features =
18
 
19
  * **Products search** - Search across all your WooCommerce products
20
+ * **Search in** - Search in product **title**, **content**, **excerpt**, **categories**, **tags** and **sku**. Or just in some of them
21
  * **Settings page** - User-friendly settings page with lot of options
22
  * **Shortcode** and **widget** - Use shortcode and widget to place search box anywhere you want
23
  * **Product image** - Each search result contains product image
96
 
97
  == Changelog ==
98
 
99
+ = 1.47 =
100
+ * Add seamless integration option
101
+ * Fix styling
102
+
103
  = 1.46 =
104
  * Add support for WPML plugin multi currency
105
  * Fix css styles