plan b on period?

so i’ve recently done the deed with my boyfriend while i was on my period and he finished inside of me. i know plan b has something to do with pushing back ovulation, but would it work the same if still i’m on my period? how exactly does it work? sorry if it sounds dumb