Plan b

Does plan b work if I’m ovulating? I took the pill an hour or so after sex.