Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimcoleman/771b99a74bbda93ee15e2686d2aff297 to your computer and use it in GitHub Desktop.
Save kimcoleman/771b99a74bbda93ee15e2686d2aff297 to your computer and use it in GitHub Desktop.
Customize a section of the Admin Activity Email
<?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