Discount Rules for WooCommerce - Version 1.7.5

Version Description

  • 10/01/19 =
  • Fix - Error because of repeated call woocommerce_before_calculate_totals
Download this release

Release Info

Developer flycart
Plugin Icon 128x128 Discount Rules for WooCommerce
Version 1.7.5
Comparing to
See all releases

Code changes from version 1.7.4 to 1.7.5

Files changed (3) hide show
  1. includes/cart-rules.php +4 -4
  2. readme.txt +4 -1
  3. woo-discount-rules.php +1 -1
includes/cart-rules.php CHANGED
@@ -707,11 +707,11 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
707
  } else {
708
  //we will have to re-calculate the sub-total if it has category selected
709
  if($this->is_category_specific($rule)) {
710
- if(!empty($this->cart_items)){
711
  if(!did_action('woocommerce_before_calculate_totals')){
712
  do_action('woocommerce_before_calculate_totals');
713
  }
714
- }
715
  $this->has_category_in_rule = 1;
716
  //re-calculate the sub-total
717
  $subtotal = $this->calculate_conditional_subtotal($this->get_discounted_categories_from_json($rule));
@@ -1501,11 +1501,11 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
1501
  */
1502
  public function calculateCartSubtotal()
1503
  {
1504
- if(!empty($this->cart_items)){
1505
  if(!did_action('woocommerce_before_calculate_totals')){
1506
  do_action('woocommerce_before_calculate_totals');
1507
  }
1508
- }
1509
 
1510
  $cart_subtotal = 0;
1511
  // Iterate over all cart items and
707
  } else {
708
  //we will have to re-calculate the sub-total if it has category selected
709
  if($this->is_category_specific($rule)) {
710
+ /*if(!empty($this->cart_items)){
711
  if(!did_action('woocommerce_before_calculate_totals')){
712
  do_action('woocommerce_before_calculate_totals');
713
  }
714
+ }*/
715
  $this->has_category_in_rule = 1;
716
  //re-calculate the sub-total
717
  $subtotal = $this->calculate_conditional_subtotal($this->get_discounted_categories_from_json($rule));
1501
  */
1502
  public function calculateCartSubtotal()
1503
  {
1504
+ /*if(!empty($this->cart_items)){
1505
  if(!did_action('woocommerce_before_calculate_totals')){
1506
  do_action('woocommerce_before_calculate_totals');
1507
  }
1508
+ }*/
1509
 
1510
  $cart_subtotal = 0;
1511
  // Iterate over all cart items and
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flycart.org/
4
  Tags: woocommerce, discounts, dynamic pricing, Buy One Get One Free, pricing deals, price rules, bulk discounts, advanced discounts, pricing deals
5
  Requires at least: 4.4.1
6
  Tested up to: 5.0
7
- Stable tag: 1.7.4
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -308,6 +308,9 @@ Discount - Enter minimum & Maximum quantity -> Adjustment Type -> Product Discou
308
 
309
  == Changelog ==
310
 
 
 
 
311
  = 1.7.4 - 09/01/19 =
312
  * Improvement - Save the rule based on language while having WPML
313
  * Fix - Fatal error for the product type changed from variant to simple
4
  Tags: woocommerce, discounts, dynamic pricing, Buy One Get One Free, pricing deals, price rules, bulk discounts, advanced discounts, pricing deals
5
  Requires at least: 4.4.1
6
  Tested up to: 5.0
7
+ Stable tag: 1.7.5
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
308
 
309
  == Changelog ==
310
 
311
+ = 1.7.5 - 10/01/19 =
312
+ * Fix - Error because of repeated call woocommerce_before_calculate_totals
313
+
314
  = 1.7.4 - 09/01/19 =
315
  * Improvement - Save the rule based on language while having WPML
316
  * Fix - Fatal error for the product type changed from variant to simple
woo-discount-rules.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
- * Version: 1.7.4
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
+ * Version: 1.7.5
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/