How to check membership and change membership with code

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Membership How to check membership and change membership with code

Tagged: 

Viewing 6 reply threads
  • Author
    Posts
    • #105897
      Matti
      Participant

      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.

    • #105908
      Craig
      Participant

      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?

    • #105910
      Matti
      Participant

      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 🙂

    • #105968
      Craig
      Participant

      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.

    • #105969
      Craig
      Participant

      these settings might be where that happens?

      Attachments:
      You must be logged in to view attached files.
    • #106107
      Matti
      Participant

      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 review

      So 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.

    • #106867
      Craig
      Participant

      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.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.