Version Description
- FIX: Apply auto coupon if discount is 0.00 and free shipping is ticked
Download this release
Release Info
Developer | josk79 |
Plugin | WooCommerce Extended Coupon Features |
Version | 1.1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.1.3.1
- readme.txt +5 -2
- woocommerce-jos-autocoupon.php +8 -3
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: josk79
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=5T9XQBCS2QHRY&lc=NL&item_name=Jos%20Koenis&item_number=wordpress%2dplugin¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
Tags: woocommerce, coupons, discount
|
5 |
Requires at least: 3.0.1
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.1.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -69,6 +69,9 @@ Sure! [This](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=5T9XQ
|
|
69 |
1. Simply use the WooCommerce Coupons menu to make a coupon an "auto coupon".
|
70 |
|
71 |
== Changelog ==
|
|
|
|
|
|
|
72 |
= 1.1.3 =
|
73 |
* Don't apply coupon if the discount is 0.00
|
74 |
* Allow applying multiple coupons via an url using *?apply_coupon=coupon_code1,coupon_code2
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=5T9XQBCS2QHRY&lc=NL&item_name=Jos%20Koenis&item_number=wordpress%2dplugin¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
Tags: woocommerce, coupons, discount
|
5 |
Requires at least: 3.0.1
|
6 |
+
Tested up to: 4.1.1
|
7 |
+
Stable tag: 1.1.3.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
69 |
1. Simply use the WooCommerce Coupons menu to make a coupon an "auto coupon".
|
70 |
|
71 |
== Changelog ==
|
72 |
+
= 1.1.3.1 =
|
73 |
+
* FIX: Apply auto coupon if discount is 0.00 and free shipping is ticked
|
74 |
+
|
75 |
= 1.1.3 =
|
76 |
* Don't apply coupon if the discount is 0.00
|
77 |
* Allow applying multiple coupons via an url using *?apply_coupon=coupon_code1,coupon_code2
|
woocommerce-jos-autocoupon.php
CHANGED
@@ -3,14 +3,16 @@
|
|
3 |
* Plugin Name: WooCommerce auto added coupons
|
4 |
* Plugin URI: http://wordpress.org/plugins/woocommerce-auto-added-coupons
|
5 |
* Description: Allow discounts to be automatically added to the cart when it's restrictions are met. Allow applying coupons via an url.
|
6 |
-
* Version: 1.1.3
|
7 |
* Author: Jos Koenis
|
8 |
* License: GPL2
|
9 |
*/
|
10 |
|
11 |
/*
|
12 |
Change history:
|
13 |
-
|
|
|
|
|
14 |
- Don't apply an auto coupon if the discount is 0.00
|
15 |
- Allow applying multiple coupons via an url using *?apply_coupon=coupon_code1,coupon_code2
|
16 |
1.1.2:
|
@@ -157,7 +159,10 @@ class WC_Jos_AutoCoupon_Controller{
|
|
157 |
return false;
|
158 |
} else if ( $coupon->individual_use == 'yes' && count( $woocommerce->cart->applied_coupons ) != 0 ) {
|
159 |
return false;
|
160 |
-
} else {
|
|
|
|
|
|
|
161 |
//Test whether discount > 0
|
162 |
foreach ( $woocommerce->cart->get_cart() as $cart_item) {
|
163 |
if ( $coupon->is_valid_for_cart() || $coupon->is_valid_for_product( $cart_item['data'], $cart_item ) ) {
|
3 |
* Plugin Name: WooCommerce auto added coupons
|
4 |
* Plugin URI: http://wordpress.org/plugins/woocommerce-auto-added-coupons
|
5 |
* Description: Allow discounts to be automatically added to the cart when it's restrictions are met. Allow applying coupons via an url.
|
6 |
+
* Version: 1.1.3.1
|
7 |
* Author: Jos Koenis
|
8 |
* License: GPL2
|
9 |
*/
|
10 |
|
11 |
/*
|
12 |
Change history:
|
13 |
+
1.1.3.1:
|
14 |
+
- FIX: Apply auto coupon if discount is 0.00 and free shipping is ticked
|
15 |
+
1.1.3:
|
16 |
- Don't apply an auto coupon if the discount is 0.00
|
17 |
- Allow applying multiple coupons via an url using *?apply_coupon=coupon_code1,coupon_code2
|
18 |
1.1.2:
|
159 |
return false;
|
160 |
} else if ( $coupon->individual_use == 'yes' && count( $woocommerce->cart->applied_coupons ) != 0 ) {
|
161 |
return false;
|
162 |
+
} else {
|
163 |
+
if ( $coupon->enable_free_shipping() ) {
|
164 |
+
return true;
|
165 |
+
}
|
166 |
//Test whether discount > 0
|
167 |
foreach ( $woocommerce->cart->get_cart() as $cart_item) {
|
168 |
if ( $coupon->is_valid_for_cart() || $coupon->is_valid_for_product( $cart_item['data'], $cart_item ) ) {
|