Created
July 28, 2014 21:16
-
-
Save pippinsplugins/6ef05f7d293cc215a441 to your computer and use it in GitHub Desktop.
Do something when the status of a member in RCP changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function pw_rcp_update_role_status_change( $new_status, $user_id ) { | |
switch( $new_status ) { | |
case 'expired' : | |
case 'pending' : | |
case 'free' : | |
case 'cancelled' : | |
// Put your cancellation code here | |
break; | |
case 'active' : | |
break; | |
} | |
} | |
add_action( 'rcp_set_status', 'pw_rcp_update_role_status_change', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment