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™

updating user meta and adding to subscriptions

s2Member Plugin. A Membership plugin for WordPress®.

updating user meta and adding to subscriptions

Postby ETSol » January 27th, 2012, 1:52 pm

Hello,
I've just switched to s2member pro after trying various other membership plugins and finding some dire problems with them - things are looking good so far, but I've got a couple of questions I'm hoping that someone can help with!

Firstly, when a new member subscribes I'd like a WP user meta entry to be updated with a value, depending on the membership level chosen - Is there any way to do this with s2member, perhaps a hook i can use?

I'd also like to be able to upsell an additional feature on each of my membership packages, like a 'silver' level and a 'silver-plus' level. I currently use just the regular 4 membership levels, but rather than creating an additional 4 'plus' levels, is there a way to offer the 'plus' as an addon/extra?

Thanks!
User avatar
ETSol
Registered User
Registered User
 
Posts: 3
Joined: January 27, 2012

Re: updating user meta and adding to subscriptions

Postby Cristián Lávaque » January 28th, 2012, 4:55 am

There are hooks that s2Member makes available to extend/customize it, and you can find them in the code itself, or the s2Member Codex. viewforum.php?f=40

You can also use the Notification API. WP Admin -> s2Member -> API / Notifications -> Sign Up

Regarding the plus access on top of the level, maybe custom capabilities would be what you want. Watch this video: http://www.s2member.com/custom-capabilities-video/

I hope that helps. :)
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: updating user meta and adding to subscriptions

Postby ETSol » January 28th, 2012, 1:50 pm

Thanks for the reply Cristián!

Forgetting about the second part of my question for the moment - I think I've located a good hook to use for my purposes - ws_plugin__s2member_after_paypal_notify - but I'm not having much success with it (from what I've read on other forum posts, it could be because the member isn't currently loggedin when it fires).

To explain what I'm trying to do a little further - I'm running a token system on my site, and the memberships I sell signify a set number of tokens available to the member monthly (ie. lvl1=10 tokens, lvl2=20 tokens etc.).
As things stand, I'm manually adding these tokens as WP user meta values once a member signs up at a given level, but ideally I'd like to hook into s2member so I can automatically assign the tokens to a member once they've paid (on both their initial payment and on subsequent recurring payments).

Am I on the right track here with the hook I'm looking at, and is it possible to get the userid associated with the paypal payment notification somehow, instead of relying on the loggedin user (which couldn't really work for recurring payments anyway lol).

Thanks again for your help!
User avatar
ETSol
Registered User
Registered User
 
Posts: 3
Joined: January 27, 2012


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest

cron