Where to get info on hook actions

I need to assign member types to paid users at the time they subcribe. This means that the profile would have a member type field that has a value that the user would understand eg owner rather than s2member level 1. I have asked about this here already with no solution, I have looked at the codex and now have somebody looking at it. This is his question -

"What action is fired after a successful signup of a user(Say after the payment is made and the user account is created/updated) and what data they pass to it.

It seems the hook I used “ws_plugin__s2member_during_paypal_notify_during_subscr_modify” may not be the right action to update member type.

If you can get this detail, I can put an update within minutes that will work."

Could please pass me that information, as this has been going on for weeks now and I need a solution please ?

Thanks

As I often say on these forums, don’t use an s2Member hook. It just complicates things unnecessarily.

WordPress already has two perfectly serviceable hooks that can be used for this: set_user_role and profile_update

You can assign labels to s2Member roles and force WordPress to use those labels. Why is that not an option for you?

Hi Pat,

I have assigned roles and forced WP to use them.

The issue is that people join level 1 as an owner, level 2 as a borrower and level 3 as both (is owner and borrower).

I need these labels to be stored on the users buddypress profile at the time they join and are invisable so they cannot change their member type if happens that owners pay more than borrowers to join for example.

Each member type has different conditional groups on their profile with ‘both’ having all groups.

The problem is getting these stored as owner, borrower or owner borrower. When a member wants to look for owners in the area they should see owners and members from the both/owner borrower member type returned from their profile search.

Cheers,

Louise

Thanks for the thorough explanation. :slight_smile: It helps.

Ok, I’m not a BuddyPress expert, so bear with me. :wink: Why do they need to be stored in the BuddyPress profile? Isn’t that just an extension of the WordPress profile? As user roles, they can’t be changed by anyone except admins so that is not an issue (or shouldn’t be unless you’ve customized something).

Again, I’m not a BuddyPress expert but I know it is hard to find a search plugin for WordPress that allows boolean searches which is what you would need to do this.

What I’d suggest based on what I know already is to use s2Member Custom Registration Fields rather than BuddyPress fields and to create member lists based on pre-configured search parameters for each group you need. See this s2Member blog post for more information: https://s2member.com/using-the-s2member-list-shortcode/.