latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Hooks (New user registration, update member)

Home Forums Community Forum Hooks (New user registration, update member)

This topic contains 5 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 2 months ago.

Topic Author Topic
Posted: Thursday Oct 11th, 2012 at 1:52 pm #28152

So far I couldn’t find a way to perform hooks that I need for this functionality.

I’ve read this topic and the hook
http://www.s2member.com/forums/topic/hook-after-level-upgrade-or-new-regristration/

But it’s not what I’m looking for. What I need is:

Hook that fires when you register, either as level:

0
1 or any other level

Hook that fires when you update your level from 0, 1 or more

Hook that fires when you terminate your billing.

Thank you

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Friday Oct 12th, 2012 at 8:07 am #28221

Hi Kevin.

This thread may be useful: http://www.primothemes.com/forums/viewtopic.php?t=10414&p=24667

I hope that helps. :)

Posted: Friday Oct 12th, 2012 at 11:51 am #28247

It only works when the signup process is handled – e.g. new user registered. However, when upgrading user from level 0 to level x, none of these hooks are fired:

add_action('ws_plugin__s2member_during_configure_user_registration_front_side', array($this, 'call_register'));
add_action('ws_plugin__s2member_during_configure_user_registration_admin_side', array($this, 'call_register'));
add_action('ws_plugin__s2member_after_handle_profile_modifications', array($this, 'call_register'));
add_action('ws_plugin__s2member_during_users_list_update_cols', array($this, 'call_register')); 

edit1:

also, this is my shortcode for updating the level

[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="$100 USD / One Time ( for lifetime access, non-recurring, no trial )" ps="paypal" lc="" cc="USD" dg="0" ns="1"  ta="0" tp="0" tt="D" ra="100" rp="1" rt="L" rr="BN" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]

edit2:

I changed my shortcode to other one, that its used for actual account upgrading (i made mistake for using the above one), but still none of the mentioned hooks above do not fire.

[s2Member-Pro-PayPal-Form modify="1" level="3" ccaps="" desc="$200 USD / One Time ( for lifetime access, non-recurring, no trial )" ps="paypal" lc="" cc="USD" dg="0" ns="1" ta="0" tp="0" tt="D" ra="200" rp="1" rt="L" rr="BN" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]
  • This reply was modified 4 years, 2 months ago by  Kevin Smith.
  • This reply was modified 4 years, 2 months ago by  Kevin Smith.
  • This reply was modified 4 years, 2 months ago by  Kevin Smith.
Posted: Saturday Oct 13th, 2012 at 1:06 am #28297

I see…

Could you try the [hilite code]set_user_role[/hilite] hook? If I’m not mistaken, it’s fired every time a user is created/updated.

Let me know how it goes. :)

Posted: Saturday Oct 13th, 2012 at 5:19 am #28308

I went with other option by hooking wordpress native hooks that involve updating user meta data, also combined with the s2member hooks that work

add_action('ws_plugin__s2member_before_configure_user_registration', array($this, 'set_registration_mode'));
add_action('ws_plugin__s2member_after_configure_user_registration', array($this, 'user_registered'));
add_action('updated_user_meta', array($this, 'updated_payment'), 1000*10, 4);
add_action('added_user_meta', array($this, 'paid_on_register'), 1000*10, 4);
add_action('ws_plugin__s2member_during_auto_eot_system_during_before_demote', array($this, 'on_user_deleted'), 1000*10, 4);
Posted: Saturday Oct 13th, 2012 at 5:37 am #28309

Thanks for the update. I’m glad to know you got it working! :)

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.