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™

Sign up confirmation email hook

s2Member Plugin. A Membership plugin for WordPress®.

Sign up confirmation email hook

Postby totomobile » May 27th, 2011, 6:43 pm

Hey guys, sorry to bother you again, I just noticed that the 1.6 release is right around the corner so you guys must be pretty busy (can't wait for that) ... but I have 1 more question to ask you:

My client is using pro forms in the registration process. We've also got Buddypress messaging setup and would like to send the Sign up confirmation email (s2->paypal options -> sign up confirmation email (pro)) to the user's buddypress message box.

I looked through paypal-notify.inc.php but there are so many filter hooks it's confusing which one I should use. Ideally I'd like a filter which sends me the processed email (with the %% fields already replaced) and I can just manually add this to their bp message box. an action would also work as we can just send them at least a welcome message. In fact any hook will do which is a confirmation of the sign up process (level1) being successful.


:)
thanks
T
User avatar
totomobile
Registered User
Registered User
 
Posts: 20
Joined: September 22, 2010

Re: Sign up confirmation email hook

Postby Cristián Lávaque » May 28th, 2011, 1:51 am

Hi Toto.

Well, the Notification API seems good to use for this. Try the Registration one for any new account, or Sign Up one for paid ones. This video may help http://www.s2member.com/api-tracking-no ... ons-video/
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: Sign up confirmation email hook

Postby totomobile » May 31st, 2011, 6:39 pm

Hi Christian, thanks for your reply here. I in fact did implement a script using the Notification API and it works great. The only issue is that the Registration Notification will send the %%user_id%%, while the Sign Up notification will not. I need this ID because that is how I know who to send a message to. I could do a reverse lookup of the database and such through emails and names but it is not a clean way to implement the code.

I understand you can't send the %%user_id%% through the Sign Up Notification because the user may not actually have an ID at that point, however, if a user exists in the site and they are already a free subscriber and they go to upgrade to a level 1 membership, then the Sign Up Notification will fire and the user WILL have a %%user_id%% so maybe it can be made available in that case..somehow .. do you think that might work?

thanks
T
User avatar
totomobile
Registered User
Registered User
 
Posts: 20
Joined: September 22, 2010

Re: Sign up confirmation email hook

Postby Cristián Lávaque » May 31st, 2011, 9:48 pm

Have you tried passing the username as a custom value?
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: Sign up confirmation email hook

Postby totomobile » June 1st, 2011, 12:15 pm

Well this is a good point, but the username is also not available for the sign up notification! However, since this is part of the sign up form it could be made available. The user id and the username are the only 2 uniquely enforced fields in the user table as far as I know, so either one would work to identify the user with the notification callback.

Thanks
T
User avatar
totomobile
Registered User
Registered User
 
Posts: 20
Joined: September 22, 2010

Re: Sign up confirmation email hook

Postby Cristián Lávaque » June 1st, 2011, 3:13 pm

No problem. :)
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


Return to s2Member Plugin

Who is online

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

cron