Last active
April 1, 2024 20:27
-
-
Save kimcoleman/771b99a74bbda93ee15e2686d2aff297 to your computer and use it in GitHub Desktop.
Customize a section of the Admin Activity Email
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 my_pmpro_modify_admin_activity_email_sections($email_sections, $frequency, $term, $report_start_date, $report_end_date, $date_range) { | |
// Directly check and modify the 'total_members' section if it exists | |
if ( isset( $email_sections['total_members'] ) ) { | |
$email_sections['total_members'] = '<tr><td>Replace with your custom code to retrive total member data here.</td></tr>'; | |
} | |
// Return the modified $email_sections array | |
return $email_sections; | |
} | |
add_filter('pmpro_admin_activity_email_sections', 'my_pmpro_modify_admin_activity_email_sections', 10, 6); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment