allow_password_reset
This is a WordPress - allow_password_reset hook. The plugin just uses it.
Filters whether to allow a password to be reset.
Usage
add_filter( 'allow_password_reset', 'wp_kama_allow_password_reset_filter', 10, 2 ); /** * Function for `allow_password_reset` filter-hook. * * @param bool $allow Whether to allow the password to be reset. * @param int $user_id The ID of the user attempting to reset a password. * * @return bool */ function wp_kama_allow_password_reset_filter( $allow, $user_id ){ // filter... return $allow; }
- $allow(true|false)
- Whether to allow the password to be reset.
Default: true - $user_id(int)
- The ID of the user attempting to reset a password.
Where the hook is called
allow_password_reset
woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php 312
$allow = apply_filters( 'allow_password_reset', true, $user_data->ID );