diff --git src/wp-includes/class-wp-error.php src/wp-includes/class-wp-error.php
index 971a4c7..73b6cdf 100644
--- src/wp-includes/class-wp-error.php
+++ src/wp-includes/class-wp-error.php
@@ -242,6 +242,23 @@ class WP_Error {
 
 		$this->error_data[$code] = $data;
 	}
+	
+	/**
+	 * Removes the specified error.
+	 *
+	 * This function removes all error messages associated with the specified
+	 * error code, along with any error data for that code. 
+	 *
+	 * @since 4.1.0
+	 *
+	 * @param string|int $code Error code.
+	 */
+	public function remove( $code ) {
+		
+		unset( $this->errors[$code] );
+		unset( $this->error_data[$code] );
+		
+	}
 }
 
 /**
diff --git tests/phpunit/tests/wp-error.php tests/phpunit/tests/wp-error.php
new file mode 100644
index 0000000..9566991
--- /dev/null
+++ tests/phpunit/tests/wp-error.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * @group wp-error
+ */
+class Tests_WP_Error extends WP_UnitTestCase {
+	
+	function test_remove_error() {
+
+		$error = new WP_Error();
+		$error->add( 'foo', "This is the first error message", "some error data" );
+		$error->add( 'foo', "This is the second error message" );
+		$error->add( 'bar', "This is another error" );
+		
+		$error->remove( 'foo' );
+		
+		//Check the error has been removed
+		$this->assertNull( $error->get_error_data( 'foo' ) );
+		$this->assertEquals( array(), $error->get_error_messages( 'foo' ) );
+		
+		//The 'bar' error should now be the 'first' error retrieved
+		$this->assertEquals( 'bar', $error->get_error_code() );
+		
+	}
+
+}
