_wp_privacy_account_request_confirmed()WP 4.9.6

Update log when privacy request is confirmed.

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

null. Nothing.

Usage

_wp_privacy_account_request_confirmed( $request_id );
$request_id(int) (required)
ID of the request.

Changelog

Since 4.9.6 Introduced.

Code of _wp_privacy_account_request_confirmed() WP 5.9.3

function _wp_privacy_account_request_confirmed( $request_id ) {
	$request = wp_get_user_request( $request_id );

	if ( ! $request ) {
		return;
	}

	if ( ! in_array( $request->status, array( 'request-pending', 'request-failed' ), true ) ) {
		return;
	}

	update_post_meta( $request_id, '_wp_user_request_confirmed_timestamp', time() );
	wp_update_post(
		array(
			'ID'          => $request_id,
			'post_status' => 'request-confirmed',
		)
	);
}