Add check for valid promo period when seeing if we need to do anything
when the cart state changes.
Patch by fu.
diffs (12 lines):
diff -r c258a5c3b96a -r 31f9f8401070 cgi-bin/DW/Hooks/AnniversaryPromotion.pm
--- a/cgi-bin/DW/Hooks/AnniversaryPromotion.pm Sun Jun 13 22:45:49 2010 +0800
+++ b/cgi-bin/DW/Hooks/AnniversaryPromotion.pm Sun Jun 13 23:23:05 2010 +0800
@@ -78,6 +78,8 @@ LJ::Hooks::register_hook( 'shop_cart_ren
# paid state, then we have to apply or unapply their bonus points.
LJ::Hooks::register_hook( 'shop_cart_state_change', sub {
my ( $cart, $newstate ) = @_;
+
+ return unless promo_valid();
# if the cart is going INTO the paid state, then we apply the bonus points
# to the user who bought the items
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog