I don't even remember if I got XP for deceiving / hiring the Ogres.
You have, it grants the same XP as killing them. I always check myself to make sure the XP gained from peaceful solutions is the same as the one through combat, so there is no XP being missed in this instance.
- If you persuaded/deceived them, then you get their XP immediately and killing them after that point won't give any.
- If you decide not to persuade/deceive and instead attack them then you'll get the XP upon killing them.