Community Support Forums — WordPress® ( Users Helping Users ) — 2011-08-22T20:57:28-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14384 2011-08-22T20:57:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14384&p=32638#p32638 <![CDATA[Re: Set default EOT for all new members]]> Statistics: Posted by Cristián Lávaque — August 22nd, 2011, 8:57 pm


]]>
2011-08-20T23:41:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14384&p=32553#p32553 <![CDATA[Re: Set default EOT for all new members]]>
Cristián Lávaque wrote:
The hack should not affect the normal use of s2Member, just set your default s2member_auto_eot_time value on registration, that's it. Please test it and let me know how it goes.

I have been stuck on another site the last days so have not had a chance to getback to this but as it ends up, this site has a very similar issue so I have used the same idea.

And yea, it seems to set the EOT date just fine...

Correct me if I am wrong but with the way s2 works, if I have EOT "Fixed-Term Extensions ( auto-extend )?" set to automatically extend existing EOT, because this function has already set the EOT to Dec 31, all future 1 year buy now renewals will always go from that date?


Many thanks, DP

Statistics: Posted by man-O-media — August 20th, 2011, 11:41 pm


]]>
2011-08-10T11:21:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14384&p=30379#p30379 <![CDATA[Re: Set default EOT for all new members]]>
The hack should not affect the normal use of s2Member, just set your default s2member_auto_eot_time value on registration, that's it. Please test it and let me know how it goes.

Statistics: Posted by Cristián Lávaque — August 10th, 2011, 11:21 am


]]>
2011-08-09T21:14:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14384&p=30351#p30351 <![CDATA[Re: Set default EOT for all new members]]>
If I understand, the code takes the current year and adds Dec 31st... Works for me, I will try it out in a little while.

I presume this will not get in the way of S2s normal operation for setting a EOT for paid items.

As for the import, yes I do have pro, in fact import<>export is one of the reasons I purchased Pro but not for this site and I have not looked at it at all yet.
Anyway, are you suggesting exporting all the users and then re-importing and during the import setting the date? Or just importing a new date into all users?
I suppose that could work in years to come however it is not something for just any Joe so I'm not sure its practical...

DP

Statistics: Posted by man-O-media — August 9th, 2011, 9:14 pm


]]>
2011-08-09T15:47:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14384&p=30321#p30321 <![CDATA[Re: Set default EOT for all new members]]> WP Admin -> s2Member -> Import/Export -> Import

About setting the EOT on registration, you could try this:

Create dir/file /wp-content/mu-plugins/s2hacks.php
Code:
<?php
add_action 
('ws_plugin__s2member_during_configure_user_registration', 's2_set_default_eot_time');
function s2_set_default_eot_time($vars = array()) {
    if (!is_admin() && $vars['processed'] === 'yes') {
        update_user_option($vars['user_id'], 's2member_auto_eot_time', strtotime(date('Y') . '-12-31'));
    }
}
?>


Let me know if that works. I hope it helps.

Statistics: Posted by Cristián Lávaque — August 9th, 2011, 3:47 pm


]]>
2011-08-08T23:03:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14384&p=30251#p30251 <![CDATA[Set default EOT for all new members]]>
How would I go about setting a default EOT for all new members/subscribers including free subscribers?

This is for a sports team site where there will often not be a relation between a payment and a EOT. There is a fee paid by a parent or guardian for a player, both of whom must register but there are multiple other people, coaches, managers, etc. who have an elevated level who pay nothing and more often than not, the payments which are made will be by check and not PayPal.
And at the end of the season, because the next seasons players must tryout and the coaches will often change, etc., everyone who registers should get an EOT of Jan 1 of the next year. So if someone registers today, their EOT would be 1/1/2012. If someone registers Jan 1, 2012, their EOT should be 1/12013.
Unless of course an admin goes in and manually sets a different EOT or they have indeed paid something and gotten a different EOT.

Right now I am manually going in to set each new subscribers EOT but I have already forgotten to set the date once or twice.

Obviously setting a EOT for a new free subscriber does not really achieve anything as I am not auto deleting accounts when the EOT date hits but if all new accounts get the EOT date then all I need to worry about is changing their level.

That all said, I'm not sure how to best handle setting a new EOT for those preexisting accounts who continue to the next year such as a player who makes the team again but I will cross that bridge when I get there.

DP

Statistics: Posted by man-O-media — August 8th, 2011, 11:03 pm


]]>