Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Membership › How to check membership and change membership with code
Tagged: -
- This topic has 6 replies, 2 voices, and was last updated 4 years, 10 months ago by Craig.
- AuthorPosts
- February 6, 2020 at 8:22 pm #105897MattiParticipant
Hi,
could someone assist me?
I’d like to check with code snippet at (Woocommerce) Checkout
– does a member (currently logged in) have already purchased membership and if yes then which one he/she currently does have.How to
– change membership plan with code snippet i.e. member has Plan A and then with code change it to Plan B. - February 6, 2020 at 9:37 pm #105908CraigParticipant
Matti,
Do you know that vendors can change their membership through their dashboard page?
Are you trying to change the membership automatically based on a purchase they made?
- February 6, 2020 at 10:17 pm #105910MattiParticipant
Hi Craig,
Maybe I’ve configured something wrong but if vendor changes membership through their dashboard then they actually don’t change membership – they need to cancel their current subscription and then go to my custom membership table and buy new membership. Well this is actually good thing. However if the very same vendor goes directly (without cancelling subscription first) to my custom membership plan table and buys new membership then he gets it right a way without making any purchase…
Example
Vendor has membership with 50 € / month subscription and he goes to custom membership table and selects membership with 1000 € / month
-> he gets membership right away and pays 1000 € after one month as opposed to if he needs to cancel first his current membership. In latter case he pays 1000 € right away.I was thinking to check membership status to prevent this but maybe I’m overthinking and there is simpler solution 🙂
- February 7, 2020 at 3:10 am #105968CraigParticipant
You might have something configured wrong for this part
“if the very same vendor goes directly (without cancelling subscription first) to my custom membership plan table and buys new membership then he gets it right a way without making any purchase” I have not tested that.There might be a setting where a “store vendor” account can’t see the membership page which would prevent them from buying a second one before they cancel their current one? When they cancel their account status changes and then they could see the membership page again?
But the changing of membership you describe currently that is my understanding as well (hopefully it will improve as the WC Lovers are always improving their plugin).
Currently the vendor needs to “cancel” their membership and sign up a new one in order to change to a different plan.Incidentally – cancelling a membership does not cancel the Paypal recurring subscription. See my thread on that here.
https://wclovers.com/forums/topic/membership-plan-not-cancelling-in-paypal-accounts/I really hope WC lovers are able to improve the “membership changing” and add integrated “paypal subscription payment cancelling” in the near future as this is an important aspect to a membership site.
- February 7, 2020 at 3:14 am #105969
- February 7, 2020 at 4:35 pm #106107MattiParticipant
I tried different settings
First scenario
– Selected “Choose Plan” as Subscription first step.
– Worst case scenario could happen
– Vendor has existing membership
– Vendor cancels membership from his dashboard
– Vendor gets auto-assigned to Basic Membership (Free with limited capabilities)
– Now vendor goes to Membership table and selects e.g. 1000 € / year membership
– Vendor gets assigned to new selected Membership without need to pay anything at this moment – next payment is one year from now.Second scenario
– Selected “Registration” as Subscription first step.
– First case works like a charm
– Vendor has existing membership
– Vendor cancels membership from his dashboard
– Vendor gets auto-assigned to Basic Membership (Free with limited capabilities)
– Now vendor goes to Membership table and selects e.g. 1000 € / year membership
– Vendor is redirected to Checkout and needs to pay for his new plan
– In this scenario the problem occurs when
– Vendor buys his first membership
– Vendor goes to Checkout and buys as supposed to
– Now instead of registering to site (as happens as a first step in first scenario) he gets welcome message saying
that your membership is under reviewSo membership changing is not working for me…
Options so far that I can think of are:
– your proposal
“There might be a setting where a “store vendor” account can’t see the membership page which would prevent them from buying a second one before
they cancel their current one? When they cancel their account status changes and then they could see the membership page again?”– In first scenario manually or with custom code change Next payment day for new membership
I think for these solutions I’d need check with code snippet does a Vendor (currently logged in) have already purchased membership and if yes then which one he/she currently does have.
- February 12, 2020 at 10:43 pm #106867CraigParticipant
Hi Matti,
Hopefully the WC Lover development team can comment in here.
I have noticed that the membership system needs work in a few areas such as the cancellation of the Paypal payment is not happening either. The membership is cancelled/changed but the auto subscription set up in Paypal is not updated/cancelled which is a major issue for a marketplace with lots of memberships.
- AuthorPosts
- You must be logged in to reply to this topic.