Version Description
Download this release
Release Info
Developer | damian-gora |
Plugin | Ajax Search for WooCommerce |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- ajax-search-for-woocommerce.php +44 -5
- readme.txt +4 -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.
|
8 |
* Author: Damian Góra
|
9 |
* Author URI: http://damiangora.com
|
10 |
* Text Domain: ajax-search-for-woocommerce
|
@@ -28,8 +28,16 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) ) {
|
|
28 |
|
29 |
public static function get_instance() {
|
30 |
if ( !isset( self::$instance ) && !( self::$instance instanceof DGWT_WC_Ajax_Search ) ) {
|
|
|
31 |
self::$instance = new DGWT_WC_Ajax_Search;
|
|
|
32 |
self::$instance->constants();
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
self::$instance->includes();
|
34 |
self::$instance->hooks();
|
35 |
|
@@ -53,12 +61,43 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) ) {
|
|
53 |
self::$instance = $this;
|
54 |
}
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
/**
|
57 |
* Setup plugin constants
|
58 |
*/
|
59 |
private function constants() {
|
60 |
|
61 |
-
$this->define( 'DGWT_WCAS_VERSION', '1.0.
|
62 |
$this->define( 'DGWT_WCAS_NAME', 'Ajax Search for WooCommerce' );
|
63 |
$this->define( 'DGWT_WCAS_FILE', __FILE__ );
|
64 |
$this->define( 'DGWT_WCAS_DIR', plugin_dir_path( __FILE__ ) );
|
@@ -76,9 +115,9 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) ) {
|
|
76 |
|
77 |
$this->define( 'DGWT_WCAS_WC_AJAX_ENDPOINT', true );
|
78 |
|
79 |
-
|
80 |
$this->define( 'DGWT_WCAS_DEBUG', false );
|
81 |
-
|
82 |
//$this->define( 'DGWT_WCAS_PRO_VERSION', true );
|
83 |
}
|
84 |
|
@@ -99,7 +138,7 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) ) {
|
|
99 |
public function includes() {
|
100 |
|
101 |
require_once DGWT_WCAS_DIR . 'includes/functions.php';
|
102 |
-
|
103 |
require_once DGWT_WCAS_DIR . 'includes/install.php';
|
104 |
|
105 |
require_once DGWT_WCAS_DIR . 'includes/admin/settings/class-settings-api.php';
|
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.2
|
8 |
* Author: Damian Góra
|
9 |
* Author URI: http://damiangora.com
|
10 |
* Text Domain: ajax-search-for-woocommerce
|
28 |
|
29 |
public static function get_instance() {
|
30 |
if ( !isset( self::$instance ) && !( self::$instance instanceof DGWT_WC_Ajax_Search ) ) {
|
31 |
+
|
32 |
self::$instance = new DGWT_WC_Ajax_Search;
|
33 |
+
|
34 |
self::$instance->constants();
|
35 |
+
|
36 |
+
if ( !self::$instance->check_requirements() ) {
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
|
40 |
+
|
41 |
self::$instance->includes();
|
42 |
self::$instance->hooks();
|
43 |
|
61 |
self::$instance = $this;
|
62 |
}
|
63 |
|
64 |
+
/*
|
65 |
+
* Check requirements
|
66 |
+
*/
|
67 |
+
|
68 |
+
private function check_requirements() {
|
69 |
+
if ( version_compare( PHP_VERSION, '5.3.0' ) < 0 ) {
|
70 |
+
add_action( 'admin_notices', array( $this, 'admin_notice_php' ) );
|
71 |
+
|
72 |
+
return false;
|
73 |
+
}
|
74 |
+
|
75 |
+
return true;
|
76 |
+
}
|
77 |
+
|
78 |
+
/*
|
79 |
+
* Notice: PHP version less than 5.3
|
80 |
+
*/
|
81 |
+
|
82 |
+
public function admin_notice_php() {
|
83 |
+
?>
|
84 |
+
<div class="error">
|
85 |
+
<p>
|
86 |
+
<?php
|
87 |
+
_e( '<b>Ajax Search for WooCommerce</b>: You need PHP version at least 5.3 to run this plugin. You are currently using PHP version ', DGWT_WCAS_DOMAIN );
|
88 |
+
echo PHP_VERSION . '.';
|
89 |
+
?>
|
90 |
+
</p>
|
91 |
+
</div>
|
92 |
+
<?php
|
93 |
+
}
|
94 |
+
|
95 |
/**
|
96 |
* Setup plugin constants
|
97 |
*/
|
98 |
private function constants() {
|
99 |
|
100 |
+
$this->define( 'DGWT_WCAS_VERSION', '1.0.2' );
|
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__ ) );
|
115 |
|
116 |
$this->define( 'DGWT_WCAS_WC_AJAX_ENDPOINT', true );
|
117 |
|
118 |
+
|
119 |
$this->define( 'DGWT_WCAS_DEBUG', false );
|
120 |
+
|
121 |
//$this->define( 'DGWT_WCAS_PRO_VERSION', true );
|
122 |
}
|
123 |
|
138 |
public function includes() {
|
139 |
|
140 |
require_once DGWT_WCAS_DIR . 'includes/functions.php';
|
141 |
+
|
142 |
require_once DGWT_WCAS_DIR . 'includes/install.php';
|
143 |
|
144 |
require_once DGWT_WCAS_DIR . 'includes/admin/settings/class-settings-api.php';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -66,6 +66,9 @@ Any suggestions or comments are welcome. Feel free to contact me using this [con
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
69 |
= 1.0.1, June 30, 2016 =
|
70 |
* FIX: Excess AJAX requests in a detail mode
|
71 |
* FIX: Optimization JS mouseover event in a detail mode
|
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.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 1.0.2, June 30, 2016 =
|
70 |
+
* FIX: PHP syntax error with PHP version < 5.3
|
71 |
+
|
72 |
= 1.0.1, June 30, 2016 =
|
73 |
* FIX: Excess AJAX requests in a detail mode
|
74 |
* FIX: Optimization JS mouseover event in a detail mode
|