Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MaximilianoRicoTabo/782048c290c5e94e0765a20d71712a6e to your computer and use it in GitHub Desktop.
Save MaximilianoRicoTabo/782048c290c5e94e0765a20d71712a6e to your computer and use it in GitHub Desktop.
Generate a custom member list query by filtering the original SQL Query and modifying as needed
<?php
/**
* Generate a custom member list query by filtering the original SQL Query and modifying as needed
*
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function custom_filtered_pmpro_members_list_sql( $sqlQuery ) {
//Here modify the SQL Query to avoid email dups
return $sqlQuery
}
add_filter( 'pmpro_members_list_sql', 'custom_filtered_pmpro_members_list_sql' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment