Code suddenly not working

The getPricingPlans is deprecated as you can see here . But I think it’s supposed to be working.

a few comments:

  1. instead of const time = new Date().getTime() you can use the shorter version: const time = Date.now()

  2. The plans.filter(items => items.expiryDate.getTime() < time); will give you the expired plans, not the active plans. Think about it - if the expiry date is smaller than the current date, it means the plan got expired.