WordPress action hook · part of WordPress core

password_reset

A WordPress core action that 29 plugins also fire themselves, running on 7.2M+ sites between them.

“Fires before the user's password is reset.”

How to use password_reset

It's an action: your callback runs at that point and receives 2 arguments. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'password_reset', function( $user, $new_pass ) {
	// Your code runs here.
}, 10, 2 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

29 plugins that fire password_reset

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs do_action( 'password_reset', $user, $new_pass ) includes/shortcodes/class-wc-shortcode-my-account.php:757
  2. Tutor LMS icon Tutor LMS90,000+ installs do_action( 'password_reset', $user, $new_pass ) classes/Utils.php:7096
  3. User Registration & Membership icon User Registration & Membership50,000+ installs do_action( 'password_reset', $user, $new_pass ) includes/shortcodes/class-ur-shortcode-my-account.php:633
  4. Login & Register Customizer icon Login & Register Customizer30,000+ installs do_action( 'password_reset', $user, $new_pass ) includes/class-xoo-el-form-handler.php:842
  5. WP Travel Engine icon WP Travel Engine20,000+ installs do_action( 'password_reset', $user, $new_pass ) includes/classes/Core/Shortcodes/UserAccount.php:680
  6. User Frontend icon User Frontend20,000+ installs do_action( 'password_reset', $user, $new_pass ) includes/Free/Simple_Login.php:1077
  7. Affiliate Program Suite icon Affiliate Program Suite10,000+ installs do_action( 'password_reset', $user, $_POST['new_password'] ) includes/users/shortcodes/functions-actions-shortcodes.php:741
  8. Classified Listing icon Classified Listing8,000+ installs do_action( 'password_reset', $user, $new_pass ) app/Shortcodes/MyAccount.php:397
  9. Masteriyo LMS icon Masteriyo LMS6,000+ installs do_action( 'password_reset', $user, $data['password'] ) includes/FormHandler/PasswordResetFormHandler.php:73
  10. WP Delicious icon WP Delicious4,000+ installs do_action( 'password_reset', $user, $new_pass ) src/dashboard/class-delicious-recipes-user-account.php:256
  11. WP Travel icon WP Travel3,000+ installs do_action( 'password_reset', $user, $new_pass ) inc/class-wp-travel-user-account.php:318
  12. Property Hive icon Property Hive3,000+ installs do_action( 'password_reset', $user, $password_1 ) includes/class-ph-ajax.php:833
  13. WP Frontend Profile icon WP Frontend Profile100+ installs do_action( 'password_reset', $user, $new_pass ) inc/class-wpfep-login.php:839
  14. IDonate icon IDonate100+ installs do_action( 'password_reset', $user, $new_pass ) src/Helpers/Helpers.php:597
  15. DynamicKit for Elementor icon DynamicKit for Elementor20+ installs do_action( 'password_reset', $user, $new_pass ) modules/login-form/module.php:422
  16. WPBoutik icon WPBoutik10+ installs do_action( 'password_reset', $user, $new_pass ) classes/plugin.php:1389
  17. CubeAccount Frontend Login icon CubeAccount Frontend Login10+ installs do_action( 'password_reset', $user, $new_pass ) cubeacct_wplogin.php:223
  18. WPCareers icon WPCareers10+ installs do_action( 'password_reset' ) include/jp_functions.php:385
  19. YaExam icon YaExam10+ installs do_action( 'password_reset', $user, $new_pass ) includes/shortcodes/class-yaexam-shortcode-my-account.php:265
  20. Custom User Registration Lite icon Custom User Registration Lite10+ installs do_action( 'password_reset', $user, $new_pass ) userreg.class.php:547
  21. MarketEngine icon MarketEngine10+ installs do_action( 'password_reset', $user, $user_data['new_pass'] ) includes/handle-authentication/class-me-authentication.php:423
  22. Author: Francis Crossen (fcrossen) icon Author: Francis Crossen (fcrossen)10+ installs do_action( 'password_reset', $u, $new_password ) tina_mvc/pages/registration_controller.php:360
  23. Softtara Resident Portal icon Softtara Resident PortalFewer than 10 installs do_action( 'password_reset', $user, $new_password ) includes/class-auth-password.php:128
  24. 23h Brand Ambassador (Affiliate, Referral) icon 23h Brand Ambassador (Affiliate, Referral)Fewer than 10 installs do_action( 'password_reset', $user, $_POST['new_password'] ) includes/users/shortcodes/functions-actions-shortcodes.php:749
  25. Gallop icon GallopFewer than 10 installs do_action( 'password_reset', $user, $password ) src/Rest/MembersEndpoint.php:496
  26. Schedopia icon SchedopiaFewer than 10 installs do_action( 'password_reset', $user, $password ) includes/Services/CustomerPortal/Auth.php:192
  27. TRC OTP Login icon TRC OTP LoginFewer than 10 installs do_action( 'password_reset', $user, $password ) includes/class-trc-wa-auth.php:670
  28. Pay2Post icon Pay2PostFewer than 10 installs do_action( 'password_reset', $user, $new_pass ) lib/framework/includes/views-login.php:424
  29. XC Authentication Plugin icon XC Authentication PluginFewer than 10 installs do_action( 'password_reset', $user, $new_pass ) wp-xc-login.php:268

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.