allow_password_reset хук-фильтрWC 1.0

Это хук WordPress - allow_password_reset. Плагин его просто использует.

Filters whether to allow a password to be reset.

Использование

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.
По умолчанию: true
$user_id(int)
The ID of the user attempting to reset a password.

Где вызывается хук

WC_Shortcode_My_Account::retrieve_password()
allow_password_reset
woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php 323
$allow = apply_filters( 'allow_password_reset', true, $user_data->ID );

Где используется хук в WooCommerce

Использование не найдено.