Last active
September 4, 2025 10:50
-
-
Save dwanjuki/db726ebeeac43ec59dbb894bfd5f66d6 to your computer and use it in GitHub Desktop.
Send PMPro admin change email after registering a member through a PMPro Zapier zap.
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 | |
/** | |
* Send PMPro admin change email after registering a member through a PMPro Zapier zap. | |
* | |
* Requires Paid Memberships Pro and PMPro Zapier Add On to be installed and activated. | |
* https://www.paidmembershipspro.com/add-ons/pmpro-zapier/ | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* | |
*/ | |
function my_pmproz_send_admin_change_email_after_addmember( $user_id, $level_id ){ | |
$user = get_userdata( $user_id ); | |
$pmpro_email = new PMProEmail(); | |
$pmpro_email->sendAdminChangeEmail( $user ); | |
} | |
add_action( 'pmproz_after_add_member', 'my_pmproz_send_admin_change_email_after_addmember', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment