Community Support Forums — WordPress® ( Users Helping Users ) — 2011-11-29T04:59:41-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6184 2011-11-29T04:59:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=54186#p54186 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
Code:
$eot_time get_user_option('s2member_auto_eot_time'); // for current user
$eot_time get_user_option('s2member_auto_eot_time'$user_id); // for specific user 


I hope that helps. :)

Statistics: Posted by Cristián Lávaque — November 29th, 2011, 4:59 am


]]>
2011-11-28T20:02:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=54121#p54121 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]> Renewing this old thread.

Since the Fixed-Term Extension will auto-extend, how do I display to a user the date on which their access will expire?

get_user_option("s2member_last_payment_time") would only work on the first payment, but, for example, if a customer renews 6 days before the end of their term using a buy now button, I need to be able to display the new end date, which would be one year and 6 days from that purchase date. The end of term must be stored somewhere for a Buy Now transaction, right? Otherwise, how will s2member know when to demote that account from level4 back to level0?

Let's assume these are annual, buy-now, non-recurring, purchases.

Thank you,

Kenny

Statistics: Posted by kennymcnett — November 28th, 2011, 8:02 pm


]]>
2011-06-06T19:06:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=20271#p20271 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]> You will see it posted here though.
viewtopic.php?f=4&t=6199&p=20120&hilit=eot+extension#p20120

Statistics: Posted by Jason Caldwell — June 6th, 2011, 7:06 pm


]]>
2011-06-06T16:18:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=20258#p20258 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]> WP Admin -> s2Member -> PayPal Options -> Automatic EOT Behavior -> Fixed-Term Extensions (auto-extend) :)

Statistics: Posted by Cristián Lávaque — June 6th, 2011, 4:18 pm


]]>
2011-06-06T13:22:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=20232#p20232 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
Not to be a bother, but any ETA on the EOT Renewal feature noted above? I'm starting to get duplicate records added to my s2Member system when expired members renew, so if it will be a while I'll attempt a workaround.

thanks,
Adam

Statistics: Posted by adamarling — June 6th, 2011, 1:22 pm


]]>
2011-05-27T17:03:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=16100#p16100 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]> Statistics: Posted by Jason Caldwell — May 27th, 2011, 5:03 pm


]]>
2011-05-27T16:41:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=16097#p16097 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
2 quick questions:

1.) Do you know an estimated release date of s2Member Pro which will include this feature?
2.) Working with existing functions available and some coding on my end, is it possible to create a custom mod to make this work on my end?

thanks,
Adam

Statistics: Posted by adamarling — May 27th, 2011, 4:41 pm


]]>
2011-05-24T19:54:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=15805#p15805 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]> s2Member -> PayPal Options -> EOT Behavior. If you're an s2Member Pro customer with an Unlimited Site License, it's already available inside your account at s2Member.com. We're currently running tests against the release candidate with Unlimited Site Licenses.

Statistics: Posted by Jason Caldwell — May 24th, 2011, 7:54 pm


]]>
2011-05-24T16:57:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=15794#p15794 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]> Statistics: Posted by adamarling — May 24th, 2011, 4:57 pm


]]>
2011-05-24T13:36:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=15787#p15787 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>

Statistics: Posted by Cristián Lávaque — May 24th, 2011, 1:36 pm


]]>
2011-05-24T13:25:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=15785#p15785 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]> Statistics: Posted by adamarling — May 24th, 2011, 1:25 pm


]]>
2011-05-24T11:08:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=15768#p15768 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>

Statistics: Posted by Cristián Lávaque — May 24th, 2011, 11:08 am


]]>
2011-05-24T02:25:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=15752#p15752 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
Can anyone else verify this hack works for them?
>> /wp-content/mu-plugins/s2-hacks.php

I can only offer non-recurring memberships, which last for 1 year, in my system. I just tried a test renewal, and it updated the EOT date to 1 year from today's date. However when I renew the same account a second time, I assume it would push the EOT date on the membership to 2 years into the future, but it stays '2012', just one year ahead.

Do you know if this hack accounts for multiple years in advance 'renewing' a non-recurring membership?

I'm looking for a situation as such:
Original Membership 10/28/2010.
Renewed on 5/20/2011 (say they would like to renew 6 months in advance)
New EOT for Membership would be 10/28/2012.

(ps. the reason I can't offer recurring memberships is that members will often be paying with company or university credit cards and generally are not allowed to pay by recurring payment).

thanks.

Statistics: Posted by adamarling — May 24th, 2011, 2:25 am


]]>
2011-05-10T16:19:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=14561#p14561 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]> Statistics: Posted by Jason Caldwell — May 10th, 2011, 4:19 pm


]]>
2011-05-07T13:08:07-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=14359#p14359 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
Jason Caldwell wrote:
The /wp-content/mu-plugins/ directory.
(mu) stands for MUST USE plugins, and these are not *just* for Multisite Networking,


ach! my hash for 2-letter acronyms collided, sorry.
Thanks for the clarification: mu shall work then ;)

Statistics: Posted by FrancescoRizzi — May 7th, 2011, 1:08 pm


]]>
2011-05-07T12:32:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=14352#p14352 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
FrancescoRizzi wrote:
Could this go in my theme's functions.php file instead?
Our WP installation is not running MU/MultiSite enabled so I'm not sure if I want/need to mess with /wp-content/mu-plugins/s2-hacks.php...

The /wp-content/mu-plugins/ directory.
(mu) stands for MUST USE plugins, and these are not *just* for Multisite Networking, they can be used on any WordPress® installation. If you don't have this directory, /wp-content/mu-plugins/ please create it.

Statistics: Posted by Jason Caldwell — May 7th, 2011, 12:32 pm


]]>
2011-05-07T11:03:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=14350#p14350 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]> Regarding the sniplet you gave me here:
Cristián Lávaque wrote:
Regarding renewals, when adding more time to their membership before their EOT is up, will cause the previous one to end and the new one to start at the time of payment.

This is something we're planning to improve, but in the meantime you can fix it with this trick:

Create this directory and file /wp-content/mu-plugins/s2-hacks.php. Inside the file, add this code. Be sure there are NO spaces or line breaks before or after <?php ?>

* This code is untested, but it should work fine. Please let me know if you have any trouble.

Code:
<?php
add_action
('ws_plugin__s2member_during_paypal_notify_during_before_subscr_signup_w_update_vars', 'during_before_subscr_signup_w_update_vars');
function during_before_subscr_signup_w_update_vars($vars = array())
{
    $GLOBALS['existing_s2_eot_time'] = get_user_option('s2member_auto_eot_time', $vars['user_id']);
}

add_action('ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars', 'during_subscr_signup_w_update_vars');
function during_subscr_signup_w_update_vars($vars = array())
{
    if (($eot_time = get_user_option('s2member_auto_eot_time', $vars['user_id'])) && $GLOBALS['existing_s2_eot_time'])
        update_user_option($user_id, 's2member_auto_eot_time', $eot_time + ($GLOBALS['existing_s2_eot_time'] - time ()));
}
?>



Could this go in my theme's functions.php file instead?
Our WP installation is not running MU/MultiSite enabled so I'm not sure if I want/need to mess with /wp-content/mu-plugins/s2-hacks.php...

Thanks,
F

Statistics: Posted by FrancescoRizzi — May 7th, 2011, 11:03 am


]]>
2011-04-27T00:33:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=13510#p13510 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
Cristián Lávaque wrote:
Actually, I think you don't even need to use the ID of the user...

Code:
<?php echo get_user_option("s2member_last_payment_time"); ?>


That may return a Unix timestamp in seconds, which you'd format with date. http://php.net/date

Yes, this is the one you'd want to use in this circumstance.
Yes, this returns a Unix Timestamp.

Statistics: Posted by Jason Caldwell — April 27th, 2011, 12:33 am


]]>
2011-04-26T13:12:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=13450#p13450 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
Code:
<?php echo get_user_option("s2member_last_payment_time"); ?>


That may return a Unix timestamp in seconds, which you'd format with date. http://php.net/date

Statistics: Posted by Cristián Lávaque — April 26th, 2011, 1:12 pm


]]>
2011-04-26T10:34:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=13412#p13412 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>

Statistics: Posted by Cristián Lávaque — April 26th, 2011, 10:34 am


]]>
2011-04-26T05:48:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=13400#p13400 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]> Statistics: Posted by FrancescoRizzi — April 26th, 2011, 5:48 am


]]>
2011-04-26T01:21:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=13392#p13392 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
Why don't you try this?

Code:
get_user_option('s2member_last_payment_date', S2MEMBER_CURRENT_USER_ID); 


I don't have paid members in my installation of s2Member, so I can't confirm that it works, but I thought I'd let you know.

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — April 26th, 2011, 1:21 am


]]>
2011-04-25T20:02:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=13360#p13360 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
FrancescoRizzi wrote:
Hmm... is
Code:
get_user_option ("s2member_auto_eot_time", $uid);
going to give me the time when the user's membership expires? 'cause.. well, our memberships are annual, I might just take 365 days away from that value...


Yeah, that could work to figure out the last time a payment was made. Good thinking. :)

Statistics: Posted by Cristián Lávaque — April 25th, 2011, 8:02 pm


]]>
2011-04-25T15:38:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=13344#p13344 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>
Regarding the registration time, I think S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME may fit our bill even better than S2MEMBER_CURRENT_USER_REGISTRATION_TIME (but thanks for pointing that out to me), since we're trying to display the time when the user paid for the membership..
However, I'm not sure if either is quite right for us...

Based on the API/Scripting documentation,
for S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME

[...] However, this will be 0 if they're not logged in; or if they've never paid you at all ( i.e. if they're still a Free Subscriber ). This holds the recorded time at which the Member originally registered their Username (or upgraded for) any type of "paid" access to your site. This value is preserved for the lifetime of their account, even if they upgrade, and even if they're demoted at some point. Once this value is recorded, it never changes under any circumstance.

So if I have a user that registers... then pays for membership on Jan 1st... then renews or upgrades on Feb 1st... if I'm reading the docs correctly S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME would report Jan 1st (whereas we'd love to say "Your membership was renewed on Feb 1st")

And S2MEMBER_CURRENT_USER_REGISTRATION_TIME is not quite it either, since it

holds the recorded time at which the User originally registered their Username for access to your site; for free or otherwise.


Hmm... is
Code:
get_user_option ("s2member_auto_eot_time", $uid);
going to give me the time when the user's membership expires? 'cause.. well, our memberships are annual, I might just take 365 days away from that value...

Statistics: Posted by FrancescoRizzi — April 25th, 2011, 3:38 pm


]]>
2011-04-24T21:11:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6184&p=13283#p13283 <![CDATA[Re: Non-Recurring payments: last Payment and renewal?]]>

I look forward to your update.

Statistics: Posted by Cristián Lávaque — April 24th, 2011, 9:11 pm


]]>