Membershio 2 pro Woocommerce integration

Hi there,

I would need that membership 2 pro would be integrated with Woocommerce, specifically I need that the registration form fields would be the same that woocommerce uses. The reason is that I need that registered users would have access to a private store (and they registration form fields would be the same than billing fields).

Is it possible?

  • Sajid
    • DEV MAN’s Sidekick

    Hi @juanma_evaristo,

    Hope you are doing good today :slight_smile:

    Yes, its possible but requires a good deal of customization that is beyond the level of support we can provide here. You either need to hire a developer or use one of these two plugins registration method.

    However, what you can do here is disable the Membership 2 registration completely and use WooCommerce registration form.

    To disable registration you need to add following code in functions.php file of your child theme (recommended) or theme.

    add_filter('ms_frontend_handle_registration', '__return_false');

    Hope that helps! Or feel free to post a reply if you have a question :slight_smile:

    Cheers, Sajid

  • juanma_evaristo
    • Flash Drive

    Hi Sajid,

    Thanks for your answer. Actually with that code in my functions file I disable the registration and I use Woocomerce one. That’s ok.. the problem is that I have lost the membership plugin functionallity.. If I fill the new registration form I don’t have access to the membership payment process

  • Sajid
    • DEV MAN’s Sidekick

    Hi @juanma_evaristo,

    Hope you are doing good today :slight_smile:

    Adding that line does not mean it will delete the register page. Its only used to tell M2 (Membership Pro 2) that registration is being handled else where for internal purposes.

    Once you have added that code then select the WooCommerce My Account page as registration page from M2 > Settings > General > Membership 2 Pages.

    Also, yes if you disable M2 registration then you will lose the payment flow of Membership 2. You have to manage redirects or send users manually to memberships page after registration/login.

    So, you have to chose one option either WooCommerce or Membership 2 for registration.

    If you want to collect details on WooCommerce pages and disabled guest checkout then you should use Membership 2 registration flow. You can also manage fields by using Profile Fields add-in, its disabled by default but you can enable it from M2 > Add-ons.

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:

    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.