What to do

So me and my boyfriend were having sex and the condom broke. We didn’t realize until after he had finished. I’m in the middle of my ovulation. So I rushed to the store and got a plan b. Will that help the situation or is there no chance of me stopping an unwanted pregnancy?