Hi,
I know you've already made your choice, but just be aware of how different it is on the wharf vs Union Square. I lived in SF for 5 years, and can tell you it is going to be entirely different based upon where you stay.
Personally, I would not stay by the wharf. I think the best place to stay is near Union Square - but then again, I've seen the wharf many times, and think it's more of a touristy place. It may be fine if you haven't seen it before. Personally, I think the area near Fillmore is pretty cool as well, but it isn't really something for tourists - lot's of locals frequent the area. Good shopping, restaurants, and there's also a cinema - it's quite trendy and diverse there (interesting) - if you plan on seeing Pac Heights stop off at Fillmore street and walk around.
Well, thinking about it - if you are going with kids, Fisherman's Wharf would be a much more kid-friendly place to stay. The thing is with Union Square is that there aren't many things to do with young children there. Mainly lot's of shops - so, if you do have kids, opt for staying around Fisherman's Wharf vs Unio Square.