[dw-free] holiday paid time promo not ending properly
[commit: http://hg.dwscoalition.org/dw-free/rev/ba1d829e2be8]
http://bugs.dwscoalition.org/show_bug.cgi?id=2312
The blurb went away when the promo expired, but the actual logic didn't.
Fix that.
Patch by
mark.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2312
The blurb went away when the promo expired, but the actual logic didn't.
Fix that.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- cgi-bin/DW/Hooks/HolidayPromotion.pm
-------------------------------------------------------------------------------- diff -r ba6815d20834 -r ba1d829e2be8 cgi-bin/DW/Hooks/HolidayPromotion.pm --- a/cgi-bin/DW/Hooks/HolidayPromotion.pm Thu Jan 21 15:54:02 2010 +0000 +++ b/cgi-bin/DW/Hooks/HolidayPromotion.pm Fri Jan 29 22:26:18 2010 +0000 @@ -36,6 +36,9 @@ LJ::Hooks::register_hook( 'shop_cart_sta # hook to add a new item when they purchase somethign eligibile LJ::Hooks::register_hook( 'shop_cart_added_item', sub { my ( $cart, $item ) = @_; + + # bail out if it's expired (2010-01-01 00:00:00) + return if time > 1262304000; # ignore promo linked items so we don't loop forever return if $item->{_holiday_promo_2009}; --------------------------------------------------------------------------------