Hello Yvette!
Thanks so much for stopping by the Disney Parks Moms Panel! I hope you are having a magical week!
You can buy your Disneyland Resort Park Tickets at the hotel, at the ticket booths in front of the parks or online and still enjoy your
Extra Magic Hour as long as you are staying at a Disneyland Resort Hotel. When you get to the gates with your Park Tickets, you will also have to have your Disneyland Resort Room Key with you.
To enhance the early entry experience, it is recommended that Guests arrive at least one hour and 15 minutes prior to regular park opening. Disneyland Park has Extra Magic Hour on Tuesdays, Thursdays and Saturdays, while Disney California Adventure Park (including access to Cars Land) has it on Mondays, Wednesdays, Fridays and Sundays.
I hope this helps and let me know if you have any other questions as you are planning your visit.
See you real soon!
-Emily