Community Support Forums — WordPress® ( Users Helping Users ) — 2011-05-06T10:21:35-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6282 2011-05-06T10:21:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6282&p=14249#p14249 <![CDATA[Re: Test for user with cancelled subscription]]>
Cristian, thanks for the code snippet, looks good.

Thanks a lot for your support, much appreciated :)
Steffen

Statistics: Posted by sruefer — May 6th, 2011, 10:21 am


]]>
2011-05-05T12:00:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6282&p=14184#p14184 <![CDATA[Re: Test for user with cancelled subscription]]>
Code:
if ($days = get_user_option('s2member_auto_eot_time'))
{
    $days = ceil(($days - time()) / 86400);

    if ($days < 1)
        echo 'Your subscription has expired.';
    elseif ($days == 1)
        echo 'Your subscription will end tomorrow!';
    else
        echo 
'You have ', $days, ' days left.';
}
 


Or, if you don't have an EOT but you know how long their membership term is, you could use 's2member_last_payment_time' instead of 's2member_auto_eot_time', and change the math to figure out the days left.

Statistics: Posted by Cristián Lávaque — May 5th, 2011, 12:00 pm


]]>
2011-05-04T23:33:18-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6282&p=14162#p14162 <![CDATA[Re: Test for user with cancelled subscription]]>
Except, s2Member will also set an EOT Time when you sell Buy Now access to Membership where there is a fixed term length to the access. In other words, if you sell a Buy Now transaction at $24.95 that grants exactly one year of access, s2Member will know ahead of time the exact date of the EOT, and it will assign the EOT Time immediately after checkout.

As long as you're not selling any Buy Now access to Membership though, you should be fine.

Statistics: Posted by Jason Caldwell — May 4th, 2011, 11:33 pm


]]>
2011-05-04T23:17:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6282&p=14159#p14159 <![CDATA[Re: Test for user with cancelled subscription]]> Statistics: Posted by sruefer — May 4th, 2011, 11:17 pm


]]>
2011-05-04T23:12:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6282&p=14158#p14158 <![CDATA[Re: Test for user with cancelled subscription]]> You're very welcome.

I see. Well, one thing that a cancellation does do, is it results in the EOT Time being set. Depending on what else you are selling, you might be able to get away with something like this in your code. I realize it's not ideal, but it might help you some until we come up with a more elegant solution.

Code:
<?php
if(get_user_option("s2member_auto_eot_time")){
    echo "Your paid access will expire soon.";
}
?>

Or, possibly something like this even.
Code:
<?php
if($time = get_user_option("s2member_auto_eot_time")){
    echo "Your paid access will expire on " . date("F j, Y", $time);
}
?>

Statistics: Posted by Jason Caldwell — May 4th, 2011, 11:12 pm


]]>
2011-05-04T22:31:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6282&p=14152#p14152 <![CDATA[Re: Test for user with cancelled subscription]]>
thanks for your reply. I was not aware of using "subscriber" instead of s2member_level0, thanks for that, I will fix that on my site.
So to summarize, whether it is cancellation or downgrade, a user where the previous billing amount is stopped or modified will still be able to access all he paid for until the expiry date. In general that is a good thing, but it makes it more difficult to target these users for a special campaign (for example, putting extra effort into gaining them back as paying customers, or giving them special permissions etc.).
Regards,
Steffen

Statistics: Posted by sruefer — May 4th, 2011, 10:31 pm


]]>
2011-05-04T15:22:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6282&p=14115#p14115 <![CDATA[Re: Test for user with cancelled subscription]]>
To put it simply, a cancellation really just stops billing; and it tells s2Member that access should be denied at some point in the future ( based on several factors ). That's it. That's all a cancellation does. It does NOT terminate their access, not immediately. This is the intended behavior.

Some other details that might help clarify.
There might be times whenever you notice that a Member's Subscription has been cancelled through PayPal®... but, s2Member continues allowing the User access to your site as a paid Member. Please don't be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User's Membership privileges when an EOT ( End Of Term ) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by s2Member. s2Member will not process an EOT until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). s2Member also calculates one extra day ( 24 hours ) into its equation, just to make sure access is not removed sooner than a Customer might expect.

So now, once the time comes, and the aforementioned cancellation results in an actual EOT ( End Of Term ), s2Member will demote the paid Member back down to Level #0, and any Custom Capabilities they had are removed as well. So the paid Member is now a Free Subscriber with no Custom Capabilities. They will continue to have access to the Login Welcome Page, and any content that is available at Level #0, but that's it. At this point, you would use current_user_is(subscriber). Although current_user_is(s2member_level0) works, that's not the recommended way of identifying a Free Subscriber. You should use current_user_is(subscriber) instead. All of these are valid.
Code:
current_user_is(subscriber)
current_user_is(s2member_level1)
current_user_is(s2member_level2)
current_user_is(s2member_level3)
current_user_is(s2member_level4)

Statistics: Posted by Jason Caldwell — May 4th, 2011, 3:22 pm


]]>
2011-05-03T12:38:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6282&p=13993#p13993 <![CDATA[Re: Test for user with cancelled subscription]]> So does that mean that someone who had a subscription of level#1 + ccap=newsletter and decided to downgrade the custom capability or to cancel his subscription entirely is still at level#1 + ccap=newsletter until the payment period expires? And after the expiry he will be level#1, or if cancelled level#0?

Thanks, regards,
Steffen

Statistics: Posted by sruefer — May 3rd, 2011, 12:38 pm


]]>
2011-05-03T12:21:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6282&p=13992#p13992 <![CDATA[Re: Test for user with cancelled subscription]]> Statistics: Posted by Cristián Lávaque — May 3rd, 2011, 12:21 pm


]]>
2011-05-03T04:10:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6282&p=13980#p13980 <![CDATA[Test for user with cancelled subscription]]>
I am creating dynamic menus depending on user subscription level in my template files, and I stumbled over a case which I did not cover yet (and I do not know how to do so for now).

If a user decides to cancel his subscription, or to downgrade it (either way), I would use a cancel or modify subscription button. I understand that afterwards, the user should still be able to access the contents he paid for, despite having cancelled or downgraded his subscription. However, how can such a user be identified?
For example, if a user cancelled his level 1 subscription, then officially he should now be Level 0. But at the same time, he should still be able to see Level 1 content. But a Level 1 user gets different membership upgrade options presented than a Level 0 user (as Level 1 upgrades might involve discounts etc.). So would that user now be tested for by [current_user_is(s2member_level0)]? Or s2member_level1? And if he would fall under s2member_level0, would he still be able to view content that I make only accessible to level1? That could case problems because some pages I allow only to be accessible by level1 users (like the membership cancellation page, or the membership cancellation feedback form page).

Thank you for your help,
Kind regards,
Steffen

Statistics: Posted by sruefer — May 3rd, 2011, 4:10 am


]]>