do_action( 'wp_error_added', string|int $code, string $message, mixed $data, WP_Error $wp_error )

Fires when an error is added to a WP_Error object.

Parameters

$code

(string|int) Error code.

$message

(string) Error message.

$data

(mixed) Error data. Might be empty.

$wp_error

(WP_Error) The WP_Error object.

Source

File: wp-includes/class-wp-error.php

View on Trac

Changelog

Version Description
5.6.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_error_added