At what level of content can membership pro 2 protect content on a pro site ?

Basically I would like to block non members from seeing a pro site if that pro site has not been paid for or goes unpaid. I could manually make the change upon payment if not automatic but until then I want Only multisite members to see the content on the pro site. Anyone else could only see the home page not the rest of the content.

I see this line "Multisite protection managed from the network admin" at https://premium.wpmudev.org/project/membership/" but no details on implementation.

thank you

  • Adam Czajczyk

    Hello wpmudevorg24,

    I hope you're well today and thank you for your question!

    Basically I would like to block non members from seeing a pro site if that pro site has not been paid for or goes unpaid.

    I admit that I'm not sure if I understand that correctly. The Pro Sites plugin should be blocking access to the site if it wasn't paid or if it "goes unpaid" and nobody should be able to make use of it until it gets paid again. That's an automatic process and I'd say a foundation of Pro Sites plugin. If I'm missing the point here, please correct me and I'll be happy to assist you.

    I see this line "Multisite protection managed from the network admin" at https://premium.wpmudev.org/project/membership/" but no details on implementation.

    This is described in "Usage" tab on the same page. Basically, our Membership 2 Pro plugin on Multisite WP may be working in one of two modes: "per site" mode or "network-wide" mode. I'm guessing that you are aiming here for the "network-wide" mode. To implement it on your site, follow these steps:

    - add this line to your site's "wp-content.php" file:

    define( 'MS_PROTECT_NETWORK', true );

    The line should be located above the "/*That's all, stop editing..." line.

    - install and network activate the Membership 2 Pro plugin (via "Network Admin -> Dashboard")

    This will turn on the "network-wide" protection and you then will be able to maintain "network wide" members' base and setup content protection rules for all the sites of the network from a central place.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello wpmudevorg24!

    Thank you for your replay and let me make sure that I understand that correctly:

    - there's a sub-site on your network
    - it's not a standard "free" site but a "Pro Site"
    - members see the site but nobody else because it wasn't paid for
    - after the site is paid for everybody else including members can see it

    Is that right? If I am correct than this wouldn't be possible. The way Pro Sites plugin works is that it requires site to be paid in order to be created at all. Later on, once it goes unpaid it's deactivated and is not available for anyone.

    This is a core functionality of a Pro Sites plugin so there's no way to override it the way you'd wish to.

    There may be a workaround for this but it would involve some "manual intervention":

    - Membership working in a "network wide" mode
    - "Pro Sites" status is manually removed from "unpaid Pro Sites" pages; as a result they become "regular" pages (but with limited features)
    - Membership protection is applied to these particular sites manually

    Then an owner of such a site could use "Upgrade" option of Pro Sites to make the site back "Pro Site" and you'd need to remove Membership 2 protection from it manually.

    Furthermore, this most likely could be automated in my opinion but this would require some complex custom development based on Membership 2 Pro API and analysis of Pro Sites' code.

    Such a code should work like this:
    - when Pro Sites deactivates the site it removes the "Pro Site" status from it
    - then applies selected membership to entire site
    - when site is upgraded back to "Pro Site" status it removes the membership protection

    This is a bit beyond the scope of this forum so you may want to ask a question at our "Jobs & Pros" job board (please note: no WPMU DEV staff involved!) here:

    https://premium.wpmudev.org/wordpress-development/

    Best regards,
    Adam

  • Lee

    Thank you for your insight.

    This work around should be enough for what this project needs.

    There may be a workaround for this but it would involve some "manual intervention":

    - Membership working in a "network wide" mode
    - "Pro Sites" status is manually removed from "unpaid Pro Sites" pages; as a result they become "regular" pages (but with limited features)
    - Membership protection is applied to these particular sites manually

    Then an owner of such a site could use "Upgrade" option of Pro Sites to make the site back "Pro Site" and you'd need to remove Membership 2 protection from it manually.

    I need just a few sites 10-20 that will be built for the purpose described above.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.