Discount Rules for WooCommerce - Version 1.4.13

Version Description

  • 15/06/17 =
  • WooCommerce Currency Switcher compatibility added
Download this release

Release Info

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

Code changes from version 1.4.12 to 1.4.13

includes/pricing-rules-3.php CHANGED
@@ -1124,6 +1124,15 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
1124
  'log' => $log,
1125
  );
1126
 
 
 
 
 
 
 
 
 
 
1127
  // Actually adjust price in cart
1128
  // $woocommerce->cart->cart_contents[$item]['data']->price = $amount;
1129
  $woocommerce->cart->cart_contents[$item]['data']->set_price($amount);
1124
  'log' => $log,
1125
  );
1126
 
1127
+ // To handle Woocommerce currency switcher
1128
+ global $WOOCS;
1129
+ if(isset($WOOCS)){
1130
+ if (method_exists($WOOCS, 'get_currencies')){
1131
+ $currencies = $WOOCS->get_currencies();
1132
+ $amount = $amount / $currencies[$WOOCS->current_currency]['rate'];
1133
+ }
1134
+ }
1135
+
1136
  // Actually adjust price in cart
1137
  // $woocommerce->cart->cart_contents[$item]['data']->price = $amount;
1138
  $woocommerce->cart->cart_contents[$item]['data']->set_price($amount);
includes/pricing-rules.php CHANGED
@@ -1125,6 +1125,15 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
1125
  'log' => $log,
1126
  );
1127
 
 
 
 
 
 
 
 
 
 
1128
  // Actually adjust price in cart
1129
  $woocommerce->cart->cart_contents[$item]['data']->price = $amount;
1130
 
1125
  'log' => $log,
1126
  );
1127
 
1128
+ // To handle Woocommerce currency switcher
1129
+ global $WOOCS;
1130
+ if(isset($WOOCS)){
1131
+ if (method_exists($WOOCS, 'get_currencies')){
1132
+ $currencies = $WOOCS->get_currencies();
1133
+ $amount = $amount / $currencies[$WOOCS->current_currency]['rate'];
1134
+ }
1135
+ }
1136
+
1137
  // Actually adjust price in cart
1138
  $woocommerce->cart->cart_contents[$item]['data']->price = $amount;
1139
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flycart.org/
4
  Tags: woocommerce, ecommerce, discounts, coupons, promotion, campaigns, sales, price rules, advanced coupons, advanced discounts
5
  Requires at least: 4.4.1
6
  Tested up to: 4.7
7
- Stable tag: 1.4.12
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -110,6 +110,10 @@ More information could be found in the documentation
110
  5. Discounted price is applied in the Cart
111
 
112
  == Changelog ==
 
 
 
 
113
  = 1.4.12 - 03/05/17 =
114
  * Fix – PHP 5.3 compatible issue
115
 
4
  Tags: woocommerce, ecommerce, discounts, coupons, promotion, campaigns, sales, price rules, advanced coupons, advanced discounts
5
  Requires at least: 4.4.1
6
  Tested up to: 4.7
7
+ Stable tag: 1.4.13
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
110
  5. Discounted price is applied in the Cart
111
 
112
  == Changelog ==
113
+
114
+ = 1.4.13 - 15/06/17 =
115
+ * WooCommerce Currency Switcher compatibility added
116
+
117
  = 1.4.12 - 03/05/17 =
118
  * Fix – PHP 5.3 compatible issue
119
 
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.4.12
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Requires at least: 4.6.1
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
+ * Version: 1.4.13
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Requires at least: 4.6.1