Code Monkey home page Code Monkey logo

pmpro-network-subsite's Introduction

Paid Memberships Pro - Multisite Membership Add On

License

Welcome to the Paid Memberships Pro - Multisite Membership Add On GitHub Repository

Manage memberships at the network’s main site (the primary domain of the network) and provide/restrict access on subsites in the network.

For more information please visit paidmembershipspro.com/add-ons/pmpro-network-membership

Installation

For detailed installation steps, visit the documentation page.

  1. Download the current development ZIP file directly: https://github.com/strangerstudios/pmpro-network-subsite/archive/dev.zip

Please ensure that once installing this version of the plugin to remove -dev from the plugin's folder name.

Bugs

If you find an issue/bug, let us know by creating a detailed GitHub issue.

Support

This is a developer's portal for Paid Memberships Pro - Multisite Membership Add On. We do not offer support on this channel. Any support related questions should be directed to paidmembershipspro.com/add-ons/pmpro-network-membership.

Contributing to Paid Memberships Pro - Multisite Membership Add On

We encourage and welcome any contribution to Paid Memberships Pro - Multisite Membership Add On. Please read the guidelines for contributing to this repository.

There are various ways to the help development of Paid Memberships Pro - Multisite Membership Add On:

  1. Report bugs/issues on GitHub.
  2. Work on any issues by submitting a Pull Request.

Here are some ways for non-developers to contribute to Paid Memberships Pro - Multisite Membership Add On:

  1. Translate Paid Memberships Pro - Multisite Membership Add On into your own language.
  2. Purchase a paid membership to help fund ongoing development and bug fixes.

pmpro-network-subsite's People

Contributors

andrewlimaza avatar dparker1005 avatar github-actions[bot] avatar ideadude avatar kalenjohnson avatar kimcoleman avatar messica avatar pbrocks avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pmpro-network-subsite's Issues

Hi there

The following doesn't seem to do anything anymore:

//remove admin pages
remove_action('admin_menu', 'pmpro_add_pages');
remove_action('admin_bar_menu', 'pmpro_admin_bar_menu');

The instructions on the plugin page are fairly cryptic. Is there any further instructions?

I'm using the latest version of PMPro and WP 4.2.2

Thanks

Make sure the expiration and other crons don't run on a subsite

We can either unhook things or remove the cron jobs (unhooking might be better in case the pmpro-network-subsite plugin is deactivated later) to keep expirations and other crons from running on the subsite.

If the subsite tries to expire a member, it might do it incompletely because user meta is unavailable from the main site or other plugins are activated on the main site only that need to interact during expiration.

Correct Syntax Error

Hi there,

With assistance from @EkoJR we discoverer a syntax error on line 55 of pmpro-network-subsite.php

  • single quotes were used instead of double quotes. Before fixing the syntax, membership levels were not flowing from the main site to the subsite. But this change corrected the issue:

Change line 55 in pmpro-network-subsite.php FROM

$membership_levels = $wpdb->get_results( 'SELECT * FROM {$wpdb->pmpro_membership_levels}', OBJECT );
TO
$membership_levels = $wpdb->get_results( "SELECT * FROM {$wpdb->pmpro_membership_levels}", OBJECT );

Hope this helps! -Ryan

Front-end user menus items for subsites

Nevertheless the issue that prompted this ticket doesn’t appear to be resolved – to duplicate the front-end user menus as they’re running on the main site, I need to be able to add a unique display location for each membership level under Menu Settings in the Menu Editor on sub-sites, as I currently can on the main site.
Main Site Menus

vs
Subsite Menus

Detailed information?

Hello. I cannot understand exactly what this code achieves and how. I am guessing that, once installed on a subsite of the network, it will contact the network´s main site to check if the user has privileges to access the subsite? A valid membership, etc?
Could you please explain in more detail how to setup this properly? I´ve followed the instructions over at http://www.paidmembershipspro.com/add-ons/plugins-on-github/pmpro-network-membership/ but i cannot actually see any difference after the addon is installed.
Thank you.

Duplicating Admin Activity Emails for all Sites in the Network

We have a few reports that the admin is receiving multiple copies of the admin activity email for each site in their network.

We are investigating this further, but it appears this is an issue and should be fixed in the Add On.

  • If a user is running a multisite with 3 unrelated sites all running PMPro, you would want an admin activity emails for each separate site.
  • If a user is running a multisite with this Add On (shared DB), the user only wants the admin activity email from the main network site.

@dparker1005 suggests the following code:
function pmpro_multisite_membership_remove_cron_admin_activity_email() { remove_action( 'pmpro_cron_admin_activity_email', 'pmpro_cron_admin_activity_email' ); } add_action( 'pmpro_cron_admin_activity_email', 'pmpro_multisite_membership_remove_cron_admin_activity_email', 9 );

I am also suggesting an improvement to the core plugin so that separate admin emails from separate sites on the network are more clearly labeled. We mark the subject line with the site name BUT nothing in the email is super obvious. We should update core to add their site's name as the first thing in the email.

Hey, SITE TITLE HERE

This issue is related to #13 which addresses how crons are handled in subsites when using this Add On.

Bug: No way to configure non-member messages for current site while plugin is activated.

The non-member and logged out messages aren't being replaced with the settings from the main site and there is no way to configure the messages while the plugin is activated. We should probably default to the main site's settings (or maybe better) add these settings to the PMPro Multisite Membership Settings admin page.

Support Ticket (Moderators Only)
https://www.paidmembershipspro.com/forums/topic/multisite-login-register-wont-redirect-to-main/?skipped

what about admin bar?

The menu still shows on the admin bar of the subsites. Would be nice to get rid of it. It shows for those who don't have the capabilities to use it so they click and get "do not have permissions" page for all 10 submenu items.

Hide Toolbar setting does not apply to sub sites when running multisite.

Describe the bug
When the Advanced setting to "Hide the Toolbar from all users with the Subscriber role." does not work across a mulitsites,

To Reproduce

  1. Multisite
  2. PMPro running each site
  3. Multisite Membership Add On installed
  4. check box in advance settings to hide toolbar for subscribers
  5. Hides for the main site but not subsites

Error when activating on a non-network WP

If the plugin is activated on a single WP install (not a Network/Multisite) the following error is thrown:

An error of type E_ERROR was caused in line 69 of the file /home3/domain/public_html/wp-content/plugins/pmpro-network-subsite/inc/class-pmpro-manage-multisite.php. Error message: Uncaught Error: Call to undefined function get_sites() in /home3/domain/public_html/wp-content/plugins/pmpro-network-subsite/inc/class-pmpro-manage-multisite.php:69 Stack trace: #0 /home3/domain/public_html/wp-includes/class-wp-hook.php(287): PMPro_Manage_Multisite::settings_page('') #1 /home3/domain/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array) #2 /home3/domain/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #3 /home3/domain/public_html/wp-admin/admin.php(254): do_action('toplevel_page_p...') #4 {main} thrown

I have recreated this error if you install and activate the multisite membership add on on a non-network WP install. we should catch this and show a message

"This plugin will only work on a WordPress Network/Multisite environment."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.