Below is a list of action hooks that are available in the Simple Membership plugin.
Front-End Hooks
swpm_after_login
This hook executes after a member logs into your site
swpm_before_login_request_is_processed
This hook is triggered before the login request is processed by the plugin. It can be used to add extra custom checks/validation from your custom code.
swpm_logout
This hook executes when a member logs out of your site.
swpm_front_end_registration_complete
This hook executes after a member completes the registration
swpm_front_end_registration_complete_user_data
This hook executes after a member completes the registration. This hook passes the member’s info also.
Below is an example of how to use this hook:
add_action('swpm_front_end_registration_complete_user_data', 'after_registration_callback'); function after_registration_callback ($member_info) { //Do stuff //print_r($member_info);//Lets see what info is in this array. }
swpm_front_end_registration_complete_fb
This hook executes after a member completes the registration using the From Builder addon. This hook passes the member’s info also.
swpm_front_end_profile_edited
This hook executes after a member edits the profile from the edit profile page.
Below is an example of how to use this hook:
add_action('swpm_front_end_profile_edited', 'after_profile_edit_callback'); function after_profile_edit_callback($member_info) { //Do stuff //print_r($member_info);//Lets see what info is in this array. }
swpm_front_end_profile_edited_fb
This hook executes after a member edits the profile from the edit profile page and is using the From Builder addon. This hook passes the member’s info also.
Admin Side Hooks
swpm_after_main_admin_menu
This hook executes after the plugin’s admin menu code is run.
Payment Processing
swpm_payment_ipn_processed
This hook executes after a payment from any payment gateway (PayPal, Stripe etc.) is processed. The hook will pass the payment data using an array parameter.
swpm_paypal_ipn_processed
This hook executes after the PayPal IPN has been processed. The hook will pass the payment data using an array parameter.
swpm_stripe_ipn_processed
This hook executes after the Stripe payment has been processed. The hook will pass the payment data using an array parameter.
swpm_braintree_ipn_processed
This hook executes after the Braintree payment has been processed. The hook will pass the payment data using an array parameter.