Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Last active February 28, 2024 11:31
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save andrewlimaza/78a4e1fb266b633aa5b138047576bfcc to your computer and use it in GitHub Desktop.
Save andrewlimaza/78a4e1fb266b633aa5b138047576bfcc to your computer and use it in GitHub Desktop.
Change the admin email for all Paid Memberships Pro admin emails.
<?php
/**
* Change the email address for all admin related emails in Paid Memberships Pro.
* Follow this guide to add custom code to your WordPress site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_change_admin_to_email( $user_email, $email ){
if( strpos( $email->template, "_admin" ) !== false ) {
$user_email = 'memberadmin@someemail.co';
}
return $user_email;
}
add_filter( "pmpro_email_recipient", "my_pmpro_change_admin_to_email", 10, 2 );
@ipokkel
Copy link

ipokkel commented Oct 4, 2021

To only change the email address for emails sent to admin after a membership checkout - https://gist.github.com/ipokkel/fc24bfd35cc5075e2b0b6e92b2ebb110

@ipokkel
Copy link

ipokkel commented Apr 21, 2023

To change the admin email for the activity reports - https://gist.github.com/dwanjuki/93331ac5c300f98523538128092212e7

@MaryOJob
Copy link

To make the change for specific membership levels, please see: https://gist.github.com/MaryOJob/db19e2a60f9c4bdbaedefca1b4af909f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment