error_code = $error_code; $this->error = $error; $this->additional_data = array_filter( (array) $additional_data ); parent::__construct( '', 409 ); } /** * Returns the error code. * * @return string */ public function getErrorCode() { return $this->error_code; } /** * Returns the list of messages. * * @return WP_Error */ public function getError() { return $this->error; } /** * Returns additional error data. * * @return array */ public function getAdditionalData() { return $this->additional_data; } }