Plugin to set up a Network Site for a Member at checkout.


Installation

  1. Make sure you have the Paid Memberships Pro plugin installed and activated.
  2. Make sure you have properly configured Network Sites on your WP install.
  3. Upload the ‘pmpro-network’ directory to the ‘/wp-content/plugins/’ directory of your site.
  4. Activate the plugin through the ‘Plugins’ menu in WordPress.

Defining the Membership Level “Site Credits”

You must define the constant PMPRO_NETWORK_MANAGE_SITES_SLUG in the pmpro-network.php file. This is the page that members will see to let them manage their sites on the network and create new sites based on the level’s allowance.

Then, add code like this to your network main site’s active theme’s functions.php or a helper PMPro Customizations plugin (our recommended method).

//set site credits for levels 1-3
function pmpro_multi_pmpron_site_credits($credits, $user_id, $level_id)
{
if($level_id == 1)
$credits = 1;
elseif($level_id == 2)
$credits = 3;
elseif($level_id == 3)
$credits = 9999;
 
return $credits;
}
add_filter("pmpron_site_credits", "pmpro_multi_pmpron_site_credits", 10, 3);