WordPress at Your Fingertips
function is not described

_wp_privacy_completed_request() WP 4.9.6

Marks a request as completed by the admin and logs the current timestamp.

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

Int|WP_Error. Request ID on success, or a WP_Error on failure.

Usage

_wp_privacy_completed_request( $request_id );
$request_id(int) (required)
Request ID.

Changelog

Since 4.9.6 Introduced.

Code of _wp_privacy_completed_request() WP 5.8.2

function _wp_privacy_completed_request( $request_id ) {
	// Get the request.
	$request_id = absint( $request_id );
	$request    = wp_get_user_request( $request_id );

	if ( ! $request ) {
		return new WP_Error( 'privacy_request_error', __( 'Invalid personal data request.' ) );
	}

	update_post_meta( $request_id, '_wp_user_request_completed_timestamp', time() );

	$result = wp_update_post(
		array(
			'ID'          => $request_id,
			'post_status' => 'request-completed',
		)
	);

	return $result;
}