Is it legal for employer to withhold pay for late completion of course?

r/

Location: Pennsylvania
My employer added a new requirement of completing an online course annually. This was announced last year with zero reminders to follow. I forgot to complete it. A reminder was sent in with a deadline of Sept. 30. I forgot and completed the course two days later. I recorded the time on my time sheet but was told that because I did not complete it on time I would not be paid for it. Is this legal? (I realize I am at fault for forgetting to complete the course on time.) Thank you for any insight!