Zac Efron performed all of his own nude scenes except for the embarrassing beach sequence. Director John Phillips states on the commentary that it was one of the most expensive scenes to make in the film. Zac wasn't actually nude at all and wore flesh-colored briefs which were edited out during the post-production process. A stunt penis was also placed over his crotch using CGI for the split-second frames where he is most exposed. Phillips mentioned that when the restricted German trailer was released onto the internet that a community of online fans were trying to grab frames on the actor's penis. Subsequently, it turns out this is the one nude scene in the film that isn't actually him.
In the scene where Zac wakes up on the beach naked with his phone ringing you can see for a second that he has missed 37 calls from Meredith and it clearly reads Thursday June 25 but their wedding is Saturday March 27 as we find out later in the hotel when Cody reads what he googled.