Dumb question.....

I took plan B, during my fertile week, he didnt cum in me I just took it because of pre-cum...Yes I did get my periods afterwards, does that mean plan B worked? I hear it doesn’t work when you ovulate so I’m still a little iffy...