Version Description
- 13/01/22 =
- Improvement - WooCommerce 6.1 compatible
- Fix - Error on API calls.
Download this release
Release Info
Developer | flycart |
Plugin | Discount Rules for WooCommerce |
Version | 2.3.12 |
Comparing to | |
See all releases |
Code changes from version 2.3.11 to 2.3.12
- readme.txt +5 -1
- v2/App/Helpers/Helper.php +2 -2
- v2/App/Helpers/Woocommerce.php +11 -5
- woo-discount-rules.php +3 -3
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flycart.org/
|
|
4 |
Tags: woocommerce, coupons, discounts, dynamic pricing, Buy One Get One Free, pricing deals, bulk discount, discount
|
5 |
Requires at least: 4.4.1
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 2.3.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -336,6 +336,10 @@ Note : Enable recursive checkbox if the discounts should be applied in sequentia
|
|
336 |
|
337 |
== Changelog ==
|
338 |
|
|
|
|
|
|
|
|
|
339 |
= 2.3.11 - 16/12/21 =
|
340 |
* Improvement - Load cart item quantity through event advanced_woo_discount_rules_cart_item_quantity.
|
341 |
* Improvement - Load cart item count through event advanced_woo_discount_rules_include_cart_item_to_count_quantity.
|
4 |
Tags: woocommerce, coupons, discounts, dynamic pricing, Buy One Get One Free, pricing deals, bulk discount, discount
|
5 |
Requires at least: 4.4.1
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 2.3.12
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
336 |
|
337 |
== Changelog ==
|
338 |
|
339 |
+
= 2.3.12 - 13/01/22 =
|
340 |
+
* Improvement - WooCommerce 6.1 compatible
|
341 |
+
* Fix - Error on API calls.
|
342 |
+
|
343 |
= 2.3.11 - 16/12/21 =
|
344 |
* Improvement - Load cart item quantity through event advanced_woo_discount_rules_cart_item_quantity.
|
345 |
* Improvement - Load cart item count through event advanced_woo_discount_rules_include_cart_item_to_count_quantity.
|
v2/App/Helpers/Helper.php
CHANGED
@@ -332,9 +332,9 @@ class Helper
|
|
332 |
|
333 |
public static function displayCompatibleCheckMessages()
|
334 |
{
|
335 |
-
if (version_compare(WDR_VERSION, '2.3.
|
336 |
if (defined('WDR_PRO_VERSION')) {
|
337 |
-
if (version_compare(WDR_PRO_VERSION, '2.3.
|
338 |
$url = admin_url() . "plugins.php";
|
339 |
$plugin_page = '<a target="_blank" href="' . $url . '">' . __('Update now', 'woo-discount-rules') . '</a>';
|
340 |
?>
|
332 |
|
333 |
public static function displayCompatibleCheckMessages()
|
334 |
{
|
335 |
+
if (version_compare(WDR_VERSION, '2.3.12', '>=')) {
|
336 |
if (defined('WDR_PRO_VERSION')) {
|
337 |
+
if (version_compare(WDR_PRO_VERSION, '2.3.12', '<')) {
|
338 |
$url = admin_url() . "plugins.php";
|
339 |
$plugin_page = '<a target="_blank" href="' . $url . '">' . __('Update now', 'woo-discount-rules') . '</a>';
|
340 |
?>
|
v2/App/Helpers/Woocommerce.php
CHANGED
@@ -137,7 +137,9 @@ class Woocommerce
|
|
137 |
|
138 |
static function is_ajax()
|
139 |
{
|
140 |
-
if (function_exists('
|
|
|
|
|
141 |
return is_ajax();
|
142 |
}
|
143 |
return false;
|
@@ -1049,8 +1051,10 @@ class Woocommerce
|
|
1049 |
static function getSession($key, $default = NULL)
|
1050 |
{
|
1051 |
if (function_exists('WC')) {
|
1052 |
-
if
|
1053 |
-
|
|
|
|
|
1054 |
}
|
1055 |
}
|
1056 |
return $default;
|
@@ -1064,8 +1068,10 @@ class Woocommerce
|
|
1064 |
static function setSession($key, $value)
|
1065 |
{
|
1066 |
if (function_exists('WC')) {
|
1067 |
-
if
|
1068 |
-
WC()->session
|
|
|
|
|
1069 |
}
|
1070 |
}
|
1071 |
}
|
137 |
|
138 |
static function is_ajax()
|
139 |
{
|
140 |
+
if (function_exists('wp_doing_ajax')) {
|
141 |
+
return wp_doing_ajax();
|
142 |
+
} else if (function_exists('is_ajax')) {
|
143 |
return is_ajax();
|
144 |
}
|
145 |
return false;
|
1051 |
static function getSession($key, $default = NULL)
|
1052 |
{
|
1053 |
if (function_exists('WC')) {
|
1054 |
+
if(isset(WC()->session) && WC()->session != null) {
|
1055 |
+
if (method_exists(WC()->session, 'get')) {
|
1056 |
+
return WC()->session->get($key);
|
1057 |
+
}
|
1058 |
}
|
1059 |
}
|
1060 |
return $default;
|
1068 |
static function setSession($key, $value)
|
1069 |
{
|
1070 |
if (function_exists('WC')) {
|
1071 |
+
if(isset(WC()->session) && WC()->session != null) {
|
1072 |
+
if (method_exists(WC()->session, 'set')) {
|
1073 |
+
WC()->session->set($key, $value);
|
1074 |
+
}
|
1075 |
}
|
1076 |
}
|
1077 |
}
|
woo-discount-rules.php
CHANGED
@@ -5,13 +5,13 @@
|
|
5 |
* Description: Simple to complex discount rules for your WooCommerce store. Core package.
|
6 |
* Author: Flycart
|
7 |
* Author URI: https://www.flycart.org
|
8 |
-
* Version: 2.3.
|
9 |
* Slug: woo-discount-rules
|
10 |
* Text Domain: woo-discount-rules
|
11 |
* Domain Path: /i18n/languages/
|
12 |
* Requires at least: 4.6.1
|
13 |
* WC requires at least: 3.0
|
14 |
-
* WC tested up to: 6.
|
15 |
*/
|
16 |
if (!defined('ABSPATH')) {
|
17 |
exit;
|
@@ -21,7 +21,7 @@ if (!defined('ABSPATH')) {
|
|
21 |
* Current version of our app
|
22 |
*/
|
23 |
if (!defined('WDR_VERSION')) {
|
24 |
-
define('WDR_VERSION', '2.3.
|
25 |
}
|
26 |
|
27 |
global $awdr_load_version;
|
5 |
* Description: Simple to complex discount rules for your WooCommerce store. Core package.
|
6 |
* Author: Flycart
|
7 |
* Author URI: https://www.flycart.org
|
8 |
+
* Version: 2.3.12
|
9 |
* Slug: woo-discount-rules
|
10 |
* Text Domain: woo-discount-rules
|
11 |
* Domain Path: /i18n/languages/
|
12 |
* Requires at least: 4.6.1
|
13 |
* WC requires at least: 3.0
|
14 |
+
* WC tested up to: 6.1
|
15 |
*/
|
16 |
if (!defined('ABSPATH')) {
|
17 |
exit;
|
21 |
* Current version of our app
|
22 |
*/
|
23 |
if (!defined('WDR_VERSION')) {
|
24 |
+
define('WDR_VERSION', '2.3.12');
|
25 |
}
|
26 |
|
27 |
global $awdr_load_version;
|