Created
September 7, 2022 05:43
-
-
Save JarrydLong/7e37050038b011490fd30fdc9479782e to your computer and use it in GitHub Desktop.
This file contains 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 //do not copy | |
/** | |
* This recipe will remove the query that filters users from the directory when using | |
* the Approvals Add On. | |
* | |
* 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 mypmpro_remove_approvals_query() { | |
remove_filter( 'pmpro_member_directory_sql_parts', array( 'PMPro_Approvals', 'pmpro_member_directory_sql_parts'), 10, 9 ); | |
} | |
add_action( 'init', 'mypmpro_remove_approvals_query' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment