onPlanPurchase Not Always Firing

Hi everyone,

I created events.js a while ago and incorporated the onPlanPurchased function. Students purchase the plan at the start of the semester and for the past year or so it has worked perfectly. This semester, the onPlanPurchased doesn’t seem to be firing every time a plan is purchased, which is leading to some headaches. Is anyone else experiencing a sudden change related to onPlanPurchased?

Here is my code for reference:

Maybe you are using the wrong event. If you haven’t yet please read the Wix Pricing Plans introduction part.

Introduction - Velo API Reference - Wix.com