Hi,
Updated thread. See latest post. Need a hook and don’t think I can use ws_plugin__s2member_before_configure_user_registration or ws_plugin__s2member_during_configure_user_registration
ORIGINAL POST
I’m working on a site for a club with many existing offline members. New members can register purely online (and pay the membership fee), but existing offline members get membership on the website for free. I have a file containing info for the current offline members, and if members enter their information during registration, they get online access for free. Also, usually both new and existing members will get level 1 access, but some existing users will get higher access levels depending on their submitted info.
How I’m currently doing it:
New or existing members click different links to get to different paypal pro forms, which have different prices ($25 or free), and different values in the “custom” attribute. I use the ws_plugin__s2member_during_configure_user_registration hook to check the submitted information for users trying to register as already-paid members (which I know from the “custom” attribute). If their info matches what’s on file, registration proceeds smoothly and they don’t have to pay. If it doesn’t match, I’m canceling the registration by calling wp_delete_user on their newly-made account and then using exit().
It feels like there should be a better way of doing things.
- I’d prefer to use the ws_plugin__s2member_before_configure_user_registration hook to check their info before the account gets created, but I can’t find any variables there to indicate whether they’re trying to make a $25 account or an already-paid account. (should I even be using the “custom” attribute for that?)
- How do I make the registration process fail nicely?
- What’s the best way to change the fields shown on each pro-form? Right now they’re the same, but I’d like to customize it. Should I use the “ws_plugin__s2member_custom_field_gen” hook? Or should I use Pro Form templates(http://s2member.com/kb-article/s2member-pro-forms/#toc-40ec91be)?
Any pointers would be appreciated.