Last active
September 15, 2021 12:56
-
-
Save kimwhite/2bb67e5f09f53f629989509a25dc022b to your computer and use it in GitHub Desktop.
Change the priority of the PMPro password message
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 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