Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrewlimaza/aa319e2f8ea8bff3c2b51da330bd84f1 to your computer and use it in GitHub Desktop.
Save andrewlimaza/aa319e2f8ea8bff3c2b51da330bd84f1 to your computer and use it in GitHub Desktop.
Bypass password reset page to use default WordPress password reset when PMPro login page is set
<?php
/**
* Bypass the reset password page PMPro uses and use the default WordPress reset password page.
* This is useful if you're using another frontend login process and have the log in page set to this.
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
remove_action( 'login_form_rp', 'pmpro_reset_password_redirect' );
remove_action( 'login_form_resetpass', 'pmpro_reset_password_redirect' );
remove_filter( 'retrieve_password_message', 'pmpro_password_reset_email_filter', 20, 3 );
remove_filter( 'wp_new_user_notification_email', 'pmpro_password_reset_email_filter', 10, 3 );
@fernandotellado
Copy link

Worked fine in a web where the reset password didn't showed anything.

Afte I added the code to a mu-plugin it worked

@TradersQue
Copy link

Does this still repair the reset password issue for PMPro?

@TradersQue
Copy link

created plugin still didnt work, any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment