WordPress at a glance
function is not described

WP_Error::get_error_data() public WP 2.1.0

Retrieves the most recently added error data for an error code.

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

No Hooks.

Return

Mixed. Error data, if it exists.

Usage

$WP_Error = new WP_Error();
$WP_Error->get_error_data( $code );
$code(string|int)
Error code.

Changelog

Since 2.1.0 Introduced.

Code of WP_Error::get_error_data() WP 5.7

<?php
public function get_error_data( $code = '' ) {
	if ( empty( $code ) ) {
		$code = $this->get_error_code();
	}

	if ( isset( $this->error_data[ $code ] ) ) {
		return $this->error_data[ $code ];
	}
}