WordPress at a glance
function is not described

WP_Error::get_all_error_data() public WP 5.6.0

Retrieves all error data for an error code in the order in which the data was added.

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

No Hooks.

Return

Mixed[]. Array of error data, if it exists.

Usage

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

Changelog

Since 5.6.0 Introduced.

Code of WP_Error::get_all_error_data() WP 5.7

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

	$data = array();

	if ( isset( $this->additional_data[ $code ] ) ) {
		$data = $this->additional_data[ $code ];
	}

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

	return $data;
}