WordPress filter hook · part of WordPress core

password_reset_expiration

A WordPress core filter that 10 plugins also fire themselves, running on 10.1M+ sites between them.

“This filter is documented in wp-includes/user.php”

How to use password_reset_expiration

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'password_reset_expiration', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

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 →

10 plugins that fire password_reset_expiration

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

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'password_reset_expiration', DAY_IN_SECONDS ) includes/shortcodes/class-wc-shortcode-my-account.php:731
  2. Jetpack icon Jetpack3+ million installs apply_filters( 'password_reset_expiration', DAY_IN_SECONDS ) jetpack_vendor/automattic/jetpack-waf/src/abstract-blocked-login-page.php:384
  3. Jetpack Protect icon Jetpack Protect100,000+ installs apply_filters( 'password_reset_expiration', DAY_IN_SECONDS ) jetpack_vendor/automattic/jetpack-waf/src/abstract-blocked-login-page.php:384
  4. Pingo Notify icon Pingo Notify300+ installs apply_filters( 'password_reset_expiration', DAY_IN_SECONDS ) src/app/Triggers/WordPressPasswordReset.php:85
  5. Eliathis Order Operations Manager icon Eliathis Order Operations ManagerFewer than 10 installs apply_filters( 'password_reset_expiration', DAY_IN_SECONDS ) includes/Portal/Portal.php:218
  6. Cliedesk icon CliedeskFewer than 10 installs apply_filters( 'password_reset_expiration', DAY_IN_SECONDS ) src/Modules/Team/Invites.php:138
  7. Messavo for WooCommerce icon Messavo for WooCommerceFewer than 10 installs apply_filters( 'password_reset_expiration', DAY_IN_SECONDS ) includes/class-messavo-notifications.php:351
  8. Subscription Manager for Stripe icon Subscription Manager for StripeFewer than 10 installs apply_filters( 'password_reset_expiration', DAY_IN_SECONDS ) templates/emails/customer-welcome.php:39
  9. Gatecraft icon GatecraftFewer than 10 installs apply_filters( 'password_reset_expiration', DAY_IN_SECONDS ) includes/http/admin.php:933
  10. Eliathis Delivery Zones and Pickup for WooCommerce icon Eliathis Delivery Zones and Pickup for WooCommerceFewer than 10 installs apply_filters( 'password_reset_expiration', DAY_IN_SECONDS ) eliathis-hub/class-eliathis-hub-portal.php:292

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.