PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Automatically Upgrade Member

s2Member Plugin. A Membership plugin for WordPress®.

Automatically Upgrade Member

Postby DigitalMcGrath » June 24th, 2011, 3:07 pm

I am not offering a free membership, instead I want to offer level 1 for free for a period of 3 days and then automatically upgrade the user to level 2. Any idea how I can accomplish this?
User avatar
DigitalMcGrath
Registered User
Registered User
 
Posts: 5
Joined: June 24, 2011

Re: Automatically Upgrade Member

Postby DigitalMcGrath » June 24th, 2011, 5:09 pm

I managed to get this to work using the s2member register link hack.
User avatar
DigitalMcGrath
Registered User
Registered User
 
Posts: 5
Joined: June 24, 2011

Re: Automatically Upgrade Member

Postby Cristián Lávaque » June 24th, 2011, 5:57 pm

I'm glad you got it working. :)

What hack do you mean? Could you post a link to it? I'm sure others will find this information helfpul.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Automatically Upgrade Member

Postby DigitalMcGrath » June 25th, 2011, 9:25 am

I used this:

Code: Select all
add_action("init", "register_level");
function register_level(){
    if(isset($_GET["register_level"])){
        $link = c_ws_plugin__s2member_register_access::register_link_gen ("none", "-", $_SERVER["HTTP_HOST"], "1:2D", false);
        wp_redirect($link); exit();
    }
}   


But as of right now it's not working correctly. It is registering users as a "Free Subscriber" and not "Level 1".
User avatar
DigitalMcGrath
Registered User
Registered User
 
Posts: 5
Joined: June 24, 2011

Re: Automatically Upgrade Member

Postby Cristián Lávaque » June 25th, 2011, 1:51 pm

Did you get it from here? viewtopic.php?f=36&t=2819

I'll ask Jason about it.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Automatically Upgrade Member

Postby Jason Caldwell » June 25th, 2011, 6:57 pm

I think the problem here is with the documentation that I wrote on this before. I mentioned that you should use a dash "-" if there was no transaction. That's bad advice, because each User must be associated with a unique Subscr. ID, even if there was no transaction. I'm updating the original thread now. Instead of using a dash, please use time() instead. Sorry for the confusion.

For instance, please try this:
Code: Select all
add_action("init", "register_level");
function register_level(){
    if(isset($_GET["register_level"])){
        $link = c_ws_plugin__s2member_register_access::register_link_gen ("n/a", time(), $_SERVER["HTTP_HOST"], "1:2D", false);
        wp_redirect($link); exit();
    }
}
 
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron