I’ve come across an odd situation in testing/building my site.
I have a user with a current paid member subscription. This user also has a canceled subscription and an expired subscription all of the same name - “Membership”
When I try to get this users subscription using getPricingPlans all that is returned is the expired plan.
Hi sirbrad , I noticed the same thing a few weeks ago and could not find a workaround. Please let me know if you do find a solution. I’m speculating there is a bug on WIX’s backend code that retrieves the user’s paid plans data. Also, it would be great if WIX could also include “payment status” and “plan status” as part of the “PricingPlan” object that is returned by “getPricingPlans” - this way we can show our website clients their current status. And while we are at it, a WIX code function to cancel the members’ plan would be GREAT! Please let me know if you are able to find any solutions to these - I would GREATLY appreciate it!
Hi Steve, it’s not necessarily a page… it’s an issue with the “getPricingPlans” API. When we call that function and a user has multiple plans, it returns an object with a single pricing plan. In other words, we are expecting to see something like:
let first_plan = pricingPlans[0];
let second_plan = pricingPlans[1];
But “getPricingPlans” only returns the first one and nothing else. So if a user has an active plan, but has had previous expired plans, we can only see the expired plan - which isn’t very useful.
Yes, I am calling getpaidplans in the $w.onReady function and can access “pricingPlans[0]”. The issue we are having is that we are expecting “pricingPlans[1]”, “pricingPlans[2]”, etc. when multiple plans are in effect. But getpaidplans only shows the first one.
When a paid plan member cancels, their plan remains active until the end of their plan period.
Let’s say a member subscribed on January 3rd and bought a one month membership. If they cancel their plan sometime in January, they still have access through February 3rd since they paid for it.
In the dashboard under “purchased plans”, their account “plan status” would show up as “pending cancellation” – rightfully so, as the system is waiting till the end of their plan period to cancel it. Calling “getpaidplans” will rightfully show the expiryDate the plan is set to expire.
HOWEVER, the problem now becomes if the member renews their plan. Calling “getpaidplans” will show their account is set to expire (the expiryDate of the FIRST plan)… and does NOT show their new plan.
So if we show the user expiryDate, they would think their account is going to expire when in fact they have renewed and are good to go. I would expect for “getpaidplans” to return ALL “active” AND “pending cancellation” plans the user has so I can loop through them.
As it stands, there is no way to let the user know what their current membership status is.
@aryjglantz So as I mentioned - using @sirbrad 's example above - you will only get valid paidplans returned in the call. If you look at the list above…
@stevendc Hey steve, thanks for looking into this The problem I’m having is that the pricing plan that is being returned when I call getPricingPlans is the one with expiry 23/01/2019, not the valid plan.
Notice how in the below example, the member “newemail” has an active plan… and a few canceled plans. Calling “getpricingplans” shows “expiryDate” as ‘2/9/2019’ from the OLDER plan (prior to the most recent one). I would expect “getpricingplans” to have an empty expiryDate - indicating the member is ACTIVE… or at least show multiple objects for each ‘active’ and ‘pending cancellation’ plans.
For example, if you cancel a monthly plan in the middle of January, the plan continues until the end for January, but does not recur in the following months. During January, in this example, the Plan Status will be “Pending Cancellation”.
You have two identical plans (named: Paid Member ) that overlap
One “pending cancellation”: Jan 9 2019 → Feb 9 2019
One “until cancelled”: Feb 6 2019 ->…
Technically the plan pending cancellation has not been cancelled so for the named plan you have configured it is the current plan. My guess, which you can test on Saturday is that the second plan will show up instead of the first which will have expired :-).
@stevendc I understand that, but that is a problem. Because if I show the user the returned “expiryDate” that ‘getPricingPlans’ returns, it will show the user that their account is due to expire… when in fact, they have renewed their plan and will remain active. Instead, ‘getPricingPlans’ should return ALL objects showing ALL plans the user has. This way, I could loop through them and decide which expiryDate to show… giving my users an accurate account status.
@sirbrad Hi Brad?
OK I have managed to recreate the problem (during which time I also uncovered another bug that needs to be fixed). I will report to QA for assessment and let you know how things proceed.