It could be useful for us to add a helper function to check whether the currently viewed page is an endpoint. I couldn’t see any native functions in WordPress that do this (correct me if I’m wrong?), so I wrote this simple function for that purpose.