WordPress at a glance
function is not described

WP_Error::remove() public WP 4.1.0

Removes the specified error.

This function removes all error messages associated with the specified error code, along with any error data for that code.

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

No Hooks.


````. Null. Nothing.


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


Since 4.1.0 Introduced.

Code of WP_Error::remove() WP 5.7

public function remove( $code ) {
	unset( $this->errors[ $code ] );
	unset( $this->error_data[ $code ] );
	unset( $this->additional_data[ $code ] );