Ajax Search for WooCommerce - Version 1.1

Version Description

Download this release

Release Info

Developer damian-gora
Plugin Icon 128x128 Ajax Search for WooCommerce
Version 1.1
Comparing to
See all releases

Code changes from version 1.0.3.1 to 1.1

ajax-search-for-woocommerce.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Ajax Search for WooCommerce
5
  * Plugin URI: https://wordpress.org/plugins/ajax-search-for-woocommerce/
6
  * Description: The plugin allows you to display the WooCommerce AJAX search form anywhere on the page.
7
- * Version: 1.0.3.1
8
  * Author: Damian Góra
9
  * Author URI: http://damiangora.com
10
  * Text Domain: ajax-search-for-woocommerce
@@ -97,7 +97,7 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) ) {
97
  */
98
  private function constants() {
99
 
100
- $this->define( 'DGWT_WCAS_VERSION', '1.0.3.1' );
101
  $this->define( 'DGWT_WCAS_NAME', 'Ajax Search for WooCommerce' );
102
  $this->define( 'DGWT_WCAS_FILE', __FILE__ );
103
  $this->define( 'DGWT_WCAS_DIR', plugin_dir_path( __FILE__ ) );
4
  * Plugin Name: Ajax Search for WooCommerce
5
  * Plugin URI: https://wordpress.org/plugins/ajax-search-for-woocommerce/
6
  * Description: The plugin allows you to display the WooCommerce AJAX search form anywhere on the page.
7
+ * Version: 1.1
8
  * Author: Damian Góra
9
  * Author URI: http://damiangora.com
10
  * Text Domain: ajax-search-for-woocommerce
97
  */
98
  private function constants() {
99
 
100
+ $this->define( 'DGWT_WCAS_VERSION', '1.1' );
101
  $this->define( 'DGWT_WCAS_NAME', 'Ajax Search for WooCommerce' );
102
  $this->define( 'DGWT_WCAS_FILE', __FILE__ );
103
  $this->define( 'DGWT_WCAS_DIR', plugin_dir_path( __FILE__ ) );
assets/css/style.css CHANGED
@@ -622,6 +622,8 @@ input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit{
622
  background: #fff;
623
  border:1px solid #ddd;
624
  border-radius: 3px;
 
 
625
  }
626
  .dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
627
  border-radius: 3px 3px 0 0;
@@ -677,10 +679,12 @@ input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit{
677
  transition: all 250ms ease-in-out;
678
  text-transform: uppercase;
679
  background-color: #96588A;
680
- border-radius: 0 2px 2px 0;
 
681
  text-shadow: 0 -1px 0 rgba(0, 0 ,0, .3);
682
  -webkit-box-shadow: none;
683
  box-shadow: none;
 
684
  }
685
  .dgwt-wcas-open .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit{
686
  border-radius: 0 2px 0 0;
622
  background: #fff;
623
  border:1px solid #ddd;
624
  border-radius: 3px;
625
+ -webkit-border-radius:3px;
626
+ -webkit-appearance: none;
627
  }
628
  .dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
629
  border-radius: 3px 3px 0 0;
679
  transition: all 250ms ease-in-out;
680
  text-transform: uppercase;
681
  background-color: #96588A;
682
+ border-radius: 0 2px 2px 0;
683
+ -webkit-border-radius:0 2px 2px 0;
684
  text-shadow: 0 -1px 0 rgba(0, 0 ,0, .3);
685
  -webkit-box-shadow: none;
686
  box-shadow: none;
687
+ -webkit-appearance: none;
688
  }
689
  .dgwt-wcas-open .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit{
690
  border-radius: 0 2px 0 0;
includes/admin/settings/class-settings.php CHANGED
@@ -404,9 +404,11 @@ class DGWT_WCAS_Settings {
404
  $value = '';
405
 
406
  if ( is_string( $option_key ) && !empty( $option_key ) ) {
 
 
407
 
408
- if ( array_key_exists( $option_key, $this->opt ) ) {
409
- $value = $this->opt[ $option_key ];
410
  } else {
411
 
412
  // Catch default
404
  $value = '';
405
 
406
  if ( is_string( $option_key ) && !empty( $option_key ) ) {
407
+
408
+ $settings = get_option( $this->setting_slug );
409
 
410
+ if ( is_array($settings) && array_key_exists( $option_key, $settings ) ) {
411
+ $value = $settings[ $option_key ];
412
  } else {
413
 
414
  // Catch default
includes/class-search.php CHANGED
@@ -339,7 +339,7 @@ class DGWT_WCAS_Search {
339
  public function search_filters( $search, &$wp_query ) {
340
  global $wpdb;
341
 
342
- if ( empty( $search ) ) {
343
  return $search; // skip processing - there is no keyword
344
  }
345
 
@@ -400,8 +400,9 @@ class DGWT_WCAS_Search {
400
 
401
  public function search_filters_join( $join, $query ) {
402
  global $wpdb;
403
-
404
- if ( defined( 'DGWT_WCAS_AJAX' ) || is_search() ) {
 
405
 
406
  if ( DGWT_WCAS()->settings->get_opt( 'search_in_product_sku' ) === 'on' ) {
407
  $join .= " INNER JOIN $wpdb->postmeta AS dgwt_wcasmsku ON ( $wpdb->posts.ID = dgwt_wcasmsku.post_id )";
339
  public function search_filters( $search, &$wp_query ) {
340
  global $wpdb;
341
 
342
+ if ( empty( $search ) || is_admin() ) {
343
  return $search; // skip processing - there is no keyword
344
  }
345
 
400
 
401
  public function search_filters_join( $join, $query ) {
402
  global $wpdb;
403
+
404
+
405
+ if ( (defined( 'DGWT_WCAS_AJAX' ) || is_search()) && !is_admin()) {
406
 
407
  if ( DGWT_WCAS()->settings->get_opt( 'search_in_product_sku' ) === 'on' ) {
408
  $join .= " INNER JOIN $wpdb->postmeta AS dgwt_wcasmsku ON ( $wpdb->posts.ID = dgwt_wcasmsku.post_id )";
includes/tmpl/search-form.php CHANGED
@@ -17,7 +17,7 @@ $has_submit = DGWT_WCAS()->settings->get_opt( 'show_submit_button' );
17
  }
18
  ?>
19
  <label class="screen-reader-text" for="dgwt-wcas-search"><?php _e( 'Products search', DGWT_WCAS_DOMAIN ) ?></label>
20
-
21
  <input
22
  type="search"
23
  id="dgwt-wcas-search"
17
  }
18
  ?>
19
  <label class="screen-reader-text" for="dgwt-wcas-search"><?php _e( 'Products search', DGWT_WCAS_DOMAIN ) ?></label>
20
+
21
  <input
22
  type="search"
23
  id="dgwt-wcas-search"
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: damian-gora
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LD2ALVRLXPZPC
4
  Tags: AJAX, ajax search, autocomplete, category search, custom search, ecommerce, instant search, sive search, product search, products, search, search by sku, search highlight, search plugin, shop, woocommerce, woocommerce live search, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress search, wp ajax search, wp search, wp search plugin, wp tao
5
  Requires at least: 3.8
6
- Tested up to: 4.5.3
7
- Stable tag: 1.0.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -37,6 +37,7 @@ See how it works on the [DEMO](http://damiangora.com/ajax-search-for-woocommerce
37
  * **Categories and tags** as suggestions
38
  * **Limit** displayed suggestions – you can set your own
39
  * **The minimum number of characters** required to display suggestions – you can set your own
 
40
  * You can set your own **label on the 'search' button**
41
  * You can set your own **preloader image**
42
  * You can set your own **colour scheme** for the 10 main form elements and suggestions
@@ -66,6 +67,11 @@ Any suggestions or comments are welcome. Feel free to contact me using this [con
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
69
  = 1.0.3.1, July 24, 2016 =
70
  * FIX: Disappearing widgets
71
  * FIX: Trivial things in CSS
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LD2ALVRLXPZPC
4
  Tags: AJAX, ajax search, autocomplete, category search, custom search, ecommerce, instant search, sive search, product search, products, search, search by sku, search highlight, search plugin, shop, woocommerce, woocommerce live search, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress search, wp ajax search, wp search, wp search plugin, wp tao
5
  Requires at least: 3.8
6
+ Tested up to: 4.6.1
7
+ Stable tag: 1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
37
  * **Categories and tags** as suggestions
38
  * **Limit** displayed suggestions – you can set your own
39
  * **The minimum number of characters** required to display suggestions – you can set your own
40
+ * WPML compatible
41
  * You can set your own **label on the 'search' button**
42
  * You can set your own **preloader image**
43
  * You can set your own **colour scheme** for the 10 main form elements and suggestions
67
 
68
  == Changelog ==
69
 
70
+ = 1.1, October 5, 2016 =
71
+ * NEW: Add WPML compatibility
72
+ * FIX: Repeating search results for products in a admin dashboard
73
+ * FIX: Overwrite default input element rounding for Safari browser
74
+
75
  = 1.0.3.1, July 24, 2016 =
76
  * FIX: Disappearing widgets
77
  * FIX: Trivial things in CSS
wpml-config.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <wpml-config>
2
+ <admin-texts>
3
+ <key name="dgwt_wcas_settings">
4
+ <key name="search_submit_text" />
5
+ <key name="search_placeholder" />
6
+ </key>
7
+ </admin-texts>
8
+ </wpml-config>