Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

_wp_privacy_resend_request( int $request_id )

Resend an existing request and return the result.


Description Description


Parameters Parameters

$request_id

(int) (Required) Request ID.


Top ↑

Return Return

(bool|WP_Error) Returns true/false based on the success of sending the email, or a WP_Error object.


Top ↑

Source Source

File: wp-admin/includes/privacy-tools.php

function _wp_privacy_resend_request( $request_id ) {
	$request_id = absint( $request_id );
	$request    = get_post( $request_id );

	if ( ! $request || 'user_request' !== $request->post_type ) {
		return new WP_Error( 'privacy_request_error', __( 'Invalid request.' ) );
	}

	$result = wp_send_user_request( $request_id );

	if ( is_wp_error( $result ) ) {
		return $result;
	} elseif ( ! $result ) {
		return new WP_Error( 'privacy_request_error', __( 'Unable to initiate confirmation request.' ) );
	}

	return true;
}

Top ↑

Changelog Changelog

Changelog
Version Description
4.9.6 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.