Last active
March 15, 2018 00:59
-
-
Save cartpauj/18a4f543af00204f4fa2 to your computer and use it in GitHub Desktop.
MemberPress + UPME integration
This file contains 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 | |
/* | |
Plugin Name: MemberPress + UPME | |
Plugin URI: https://memberpress.com | |
Description: Activates UPME profiles when a user signs up via MemberPress. | |
Version: 1.0 | |
Author: Caseproof, LLC | |
Author URI: http://caseproof.com/ | |
Copyright: 2004-2014, Caseproof, LLC | |
*/ | |
function mepr_upme_activate($txn) { | |
update_user_meta($txn->user_id, 'upme_activation_status', 'ACTIVE'); | |
update_user_meta($txn->user_id, 'upme_approval_status', 'ACTIVE'); | |
update_user_meta($txn->user_id, 'upme_user_profile_status', 'ACTIVE'); | |
upme_update_user_cache($txn->user_id); | |
} | |
//add_action('mepr-signup', 'mepr_upme_activate'); //Use this if you don't want to wait for completed payment | |
add_action('mepr-txn-status-complete', 'mepr_upme_activate'); //Use this if you want to wait for completed payment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment