Version Description
Release Date - 2018-09-02 * FIX: Fatal error in FREE version of the plugin * FIX: Require PHP5.4
Download this release
Release Info
Developer | josk79 |
Plugin | WooCommerce Extended Coupon Features |
Version | 3.0.1 |
Comparing to | |
See all releases |
Code changes from version 3.0.0 to 3.0.1
includes/class-wjecf-bootstrap.php
CHANGED
@@ -63,12 +63,12 @@ class WJECF_Bootstrap {
|
|
63 |
if ( strncmp( $prefix, $class, strlen( $prefix ) ) !== 0 ) {
|
64 |
return;
|
65 |
}
|
66 |
-
$file =
|
67 |
$subdirs = array( '/includes/', '/pro/' );
|
68 |
foreach ( $subdirs as $subdir ) {
|
69 |
$fullpath = dirname( __DIR__ ) . $subdir . $file;
|
70 |
if ( file_exists( $fullpath ) ) {
|
71 |
-
require $fullpath;
|
72 |
return;
|
73 |
}
|
74 |
}
|
@@ -76,10 +76,6 @@ class WJECF_Bootstrap {
|
|
76 |
);
|
77 |
}
|
78 |
|
79 |
-
protected function to_filename( $class_name ) {
|
80 |
-
return strtolower( 'class-' . str_replace( '_', '-', $class_name ) . '.php' );
|
81 |
-
}
|
82 |
-
|
83 |
protected function register_global_functions() {
|
84 |
/**
|
85 |
* Get the instance of WJECF
|
63 |
if ( strncmp( $prefix, $class, strlen( $prefix ) ) !== 0 ) {
|
64 |
return;
|
65 |
}
|
66 |
+
$file = strtolower( 'class-' . str_replace( '_', '-', $class ) . '.php' );
|
67 |
$subdirs = array( '/includes/', '/pro/' );
|
68 |
foreach ( $subdirs as $subdir ) {
|
69 |
$fullpath = dirname( __DIR__ ) . $subdir . $file;
|
70 |
if ( file_exists( $fullpath ) ) {
|
71 |
+
require( $fullpath );
|
72 |
return;
|
73 |
}
|
74 |
}
|
76 |
);
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
79 |
protected function register_global_functions() {
|
80 |
/**
|
81 |
* Get the instance of WJECF
|
includes/class-wjecf-controller.php
CHANGED
@@ -29,7 +29,7 @@ class WJECF_Controller {
|
|
29 |
*/
|
30 |
public static function instance() {
|
31 |
if ( is_null( self::$_instance ) ) {
|
32 |
-
self::$_instance = class_exists( 'WJECF_Pro_Controller' ) ? new WJECF_Pro_Controller() :
|
33 |
}
|
34 |
return self::$_instance;
|
35 |
}
|
29 |
*/
|
30 |
public static function instance() {
|
31 |
if ( is_null( self::$_instance ) ) {
|
32 |
+
self::$_instance = class_exists( 'WJECF_Pro_Controller' ) ? new WJECF_Pro_Controller() : new WJECF_Controller();
|
33 |
}
|
34 |
return self::$_instance;
|
35 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce, coupons, discount
|
|
4 |
Requires at least: 4.8
|
5 |
Requires PHP: 5.4
|
6 |
Tested up to: 4.9.8
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -17,7 +17,7 @@ Very easy to use, the functionality is conveniently integrated to the WooCommerc
|
|
17 |
|
18 |
Requires:
|
19 |
* WooCommerce 3.0 or newer (3.4+ recommended)
|
20 |
-
* PHP 5.
|
21 |
* WordPress 4.8 or newer
|
22 |
|
23 |
For compatibility with older versions of WooCommerce, please use "WooCommerce Extended Coupon Features" version 2.6.3.
|
@@ -108,6 +108,11 @@ add_filter( 'woocommerce_checkout_fields', function( $checkout_fields ) {
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
|
|
111 |
= 3.0.0 =
|
112 |
*Release Date - 2018-09-02*
|
113 |
* IMPORTANT: Requires WooCommerce 3.0+ WordPress 4.8+ and PHP 5.3+
|
4 |
Requires at least: 4.8
|
5 |
Requires PHP: 5.4
|
6 |
Tested up to: 4.9.8
|
7 |
+
Stable tag: 3.0.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
17 |
|
18 |
Requires:
|
19 |
* WooCommerce 3.0 or newer (3.4+ recommended)
|
20 |
+
* PHP 5.4 or newer (7.0+ Recommended)
|
21 |
* WordPress 4.8 or newer
|
22 |
|
23 |
For compatibility with older versions of WooCommerce, please use "WooCommerce Extended Coupon Features" version 2.6.3.
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 3.0.1 =
|
112 |
+
*Release Date - 2018-09-02*
|
113 |
+
* FIX: Fatal error in FREE version of the plugin
|
114 |
+
* FIX: Require PHP5.4
|
115 |
+
|
116 |
= 3.0.0 =
|
117 |
*Release Date - 2018-09-02*
|
118 |
* IMPORTANT: Requires WooCommerce 3.0+ WordPress 4.8+ and PHP 5.3+
|
woocommerce-jos-autocoupon.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WooCommerce Extended Coupon Features FREE
|
4 |
* Plugin URI: http://www.soft79.nl
|
5 |
* Description: Additional functionality for WooCommerce Coupons.
|
6 |
-
* Version: 3.0.
|
7 |
* Author: Soft79
|
8 |
* License: GPL2
|
9 |
* WC requires at least: 3.0.0
|
@@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
}
|
16 |
|
17 |
if ( ! defined( 'WJECF_VERSION' ) ) {
|
18 |
-
define( 'WJECF_VERSION', '3.0.
|
19 |
}
|
20 |
|
21 |
// NOTE: This file must be compatible with old PHP versions. All other files can be PHP 5.6+ .
|
@@ -40,7 +40,7 @@ if ( ! function_exists( 'wjecf_load_plugin_textdomain' ) ) {
|
|
40 |
$requirements = array(
|
41 |
array(
|
42 |
'program' => 'PHP',
|
43 |
-
'required_version' => '5.
|
44 |
'current_version' => phpversion(),
|
45 |
),
|
46 |
array(
|
@@ -61,7 +61,7 @@ if ( ! function_exists( 'wjecf_load_plugin_textdomain' ) ) {
|
|
61 |
$message = __( 'This plugin requires %1$s, please install it.', 'woocommerce-jos-autocoupon' );
|
62 |
throw new Exception( sprintf( $message, $req['program'], $req['required_version'] ) );
|
63 |
}
|
64 |
-
if (
|
65 |
/* translators: 1: program 2: version 3: version of WooCommerce Extended Coupon Features */
|
66 |
$message = __(
|
67 |
'This plugin requires %1$s version %2$s or higher. You are running version %3$s. Please update %1$s or install a version of WooCommerce Extended Coupon Features prior to %4$s.',
|
3 |
* Plugin Name: WooCommerce Extended Coupon Features FREE
|
4 |
* Plugin URI: http://www.soft79.nl
|
5 |
* Description: Additional functionality for WooCommerce Coupons.
|
6 |
+
* Version: 3.0.1
|
7 |
* Author: Soft79
|
8 |
* License: GPL2
|
9 |
* WC requires at least: 3.0.0
|
15 |
}
|
16 |
|
17 |
if ( ! defined( 'WJECF_VERSION' ) ) {
|
18 |
+
define( 'WJECF_VERSION', '3.0.1' );
|
19 |
}
|
20 |
|
21 |
// NOTE: This file must be compatible with old PHP versions. All other files can be PHP 5.6+ .
|
40 |
$requirements = array(
|
41 |
array(
|
42 |
'program' => 'PHP',
|
43 |
+
'required_version' => '5.4',
|
44 |
'current_version' => phpversion(),
|
45 |
),
|
46 |
array(
|
61 |
$message = __( 'This plugin requires %1$s, please install it.', 'woocommerce-jos-autocoupon' );
|
62 |
throw new Exception( sprintf( $message, $req['program'], $req['required_version'] ) );
|
63 |
}
|
64 |
+
if ( version_compare( $req['current_version'], $req['required_version'], '<' ) ) {
|
65 |
/* translators: 1: program 2: version 3: version of WooCommerce Extended Coupon Features */
|
66 |
$message = __(
|
67 |
'This plugin requires %1$s version %2$s or higher. You are running version %3$s. Please update %1$s or install a version of WooCommerce Extended Coupon Features prior to %4$s.',
|