Skip to content

Instantly share code, notes, and snippets.

@kimwhite
Last active September 15, 2021 12:56
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 kimwhite/2bb67e5f09f53f629989509a25dc022b to your computer and use it in GitHub Desktop.
Save kimwhite/2bb67e5f09f53f629989509a25dc022b to your computer and use it in GitHub Desktop.
Change the priority of the PMPro password message
<?php // do not copy this line.
/**
* This recipe change priority of retrieve password message
*
* 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/
*/
// Use the below code to simply move the field
// ===============================================================================
function my_pmpro_change_reset_priority() {
remove_action( 'retrieve_password_message', 'pmpro_password_reset_email_filter', 20, 3 );
add_action( 'retrieve_password_message', 'pmpro_password_reset_email_filter', 99, 3 );
}
add_action( 'init', 'my_pmpro_change_reset_priority' );
// ===============================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment