When Did Triple H Find Out He Had To Use The Rock For WWE WrestleMania?
Was 'The Great One' in Triple H's plans before or after the Royal Rumble?

Triple H had every intention of booking Cody Rhodes Vs Roman Reigns and CM Punk Vs Seth Rollins as the two WrestleMania main events before The Rock was forced into plans as of last week's SmackDown.
Or did he?
Fightful Select are reporting so. On what all the wrestlers and creative were anticipating for WrestleMania season in January, they said;
"While we can’t speak to the grander situation and who planned what specifically, we can speak to Cody Rhodes, Seth Rollins, CM Punk, the creative team, producers and those around them – they were not told that an elaborate, multi-faceted work was the plan. As of last week, Cody Rhodes vs. Seth Rollins was the direction told to creative. Prior to the Royal Rumble, CM Punk vs. Seth Rollins was the active plan, and was relayed to Punk himself. So if there was a “work” at play, it didn’t involve those parties ahead of the Royal Rumble, so it would have been a work on them as well."
This would at least explain why Rhodes was booked not only to win the Rumble but target all of his attention in the post-match on Roman Reigns specifically. The doubt had never been over what Rhodes would do if he won, merely if he would win at all and that scene appeared to confirm as much.
However, the report continues that, over Royal Rumble weekend itself, things might have taken a turn without the knowledge of multiple key figures. It said;
"...we’ve heard the day of the Rumble, several in creative were told The Rock vs. Roman Reigns was the plan, and merchandise had been produced to promote it. As far as word that the plan for The Rock and Roman Reigns was the plan dating back to January 3, we have heard from WWE sources that there were meetings on January 1, and others along the way that had indicated to Cody Rhodes that the creative direction had not changed, and he was slated to face Reigns at WrestleMania. Up until the week prior to the Royal Rumble, no other parties that we’d heard from or have spoken to since were made aware. To the best of our knowledge, a select group of people were informed Royal Rumble weekend that the direction had changed...Other sources claim that this decision goes all the way up to Ari Emanuel and Mark Shapiro, and was even above Nick Khan and Triple H".
The mention of "January 3" is in reference to reporting from Dave Meltzer that Rock made the deal to come in on that date and a WrestleMania 40 showdown with Roman Reigns was part of the deal.
There, he said;
"When (Rock) made the deal on January 3 to come in (facing Roman at WrestleMania) was part of the deal. Why Cody Rhodes won the Royal Rumble is a question that I cannot answer because nobody will answer it for me...(It) played out the way they wanted it to play out. The plan as of Friday night was Seth Rollins and Cody Rhodes and we'll see how it plays out because now they're trying to turn it into a story and we'll see how the story goes."
He has persisted with the idea of much of everything to do with Cody's current story being a work, noting that only the Rumble booking doesn't add up.
As with most current aspects of the story, everything might be clearer following Thursday's WrestleMania press conference.