WordPress at Your Fingertips
function is not described

WC_Form_Handler::process_lost_password() public WC 1.0

Handle lost password form.

{} It's a method of the class: WC_Form_Handler{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Form_Handler::process_lost_password();

Code of WC_Form_Handler::process_lost_password() WC 5.8.0

public static function process_lost_password() {
	if ( isset( $_POST['wc_reset_password'], $_POST['user_login'] ) ) {
		$nonce_value = wc_get_var( $_REQUEST['woocommerce-lost-password-nonce'], wc_get_var( $_REQUEST['_wpnonce'], '' ) ); // @codingStandardsIgnoreLine.

		if ( ! wp_verify_nonce( $nonce_value, 'lost_password' ) ) {
			return;
		}

		$success = WC_Shortcode_My_Account::retrieve_password();

		// If successful, redirect to my account with query arg set.
		if ( $success ) {
			wp_safe_redirect( add_query_arg( 'reset-link-sent', 'true', wc_get_account_endpoint_url( 'lost-password' ) ) );
			exit;
		}
	}
}