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
| /* | |
| Change admin_change email sent to members when they move from "Applicant" level to "Approved" level. | |
| You should have two levels, "Applicant" level ID 1 and "Approved" level ID 2. | |
| If the names or IDs of your levels are different, you will have to change the code below. | |
| You also need a file "applicant_approved.html" in the ../themes/yourtheme/paid-memberships-pro/email/ directory. | |
| */ | |
| function my_pmpro_email_filter($email) | |
| { | |
| if($email->template == "admin_change" && $email->data['membership_level_name'] == "Approved") | |
| { |
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
| add_filter("pmpro_login_redirect", "__return_false"); |
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 | |
| /** | |
| * When registering, add the member to a specific membership level | |
| * @param integer $user_id | |
| **/ | |
| //Disables the pmpro redirect to levels page when user tries to register | |
| add_filter("pmpro_login_redirect", "__return_false"); | |
| function my_pmpro_default_registration_level($user_id) { |
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
| /** | |
| * When registering, add the member to a specific membership level | |
| * @param integer $user_id | |
| **/ | |
| //Disables the pmpro redirect to levels page when user tries to register | |
| add_filter("pmpro_login_redirect", "__return_false"); | |
| function my_pmpro_default_registration_level($user_id) { | |
| //Give all members who register membership level 1 | |
| pmpro_changeMembershipLevel(1, $user_id); | |
| } |
OlderNewer