How do I get my toddler to poop in toilet?

☁️ • 👩‍❤️‍💋‍👨 💍 ❤ Happy mommy 🥰 Love my babies 💙💙💜

My 2 and a half year old is doing great with potty training. He pees in toilet with no issues. BUT he won't poop in it. There's been a couple of times where he has but most times he just poops in underwear. Sometimes he even goes and hides where I'm not looking. I have asked if he wants to go potty and he says no and tells me he has to go potty after he's already done so in underwear. How do I encourage him to poop in toilet? This is also another reason why I put pull ups on him when we're out and about. Also how does everyone handle the whole potty training when out and about? Where there may not be a restroom nearby?