How to get world rotation of capsule component in C++?

I was working on converting some blueprint code to c++ that involves rotating my character’s capsule component towards the last input vector. I have looked around but I am still having trouble finding the c++ implementation of getting the world rotation of the capsule component like in my character blueprint.

Any suggestions as to how to get the world rotation of the capsule component?

First

#include "Components/CapsuleComponent.h"

Then

Capsule->GetComponentRotation()