diff --git a/pmpro-network.php b/pmpro-network.php index d7aa1df..97d7cdc 100644 --- a/pmpro-network.php +++ b/pmpro-network.php @@ -68,9 +68,12 @@ function pmpron_init() { First we need to add some fields to the checkout page. */ //add the fields to the form -function pmpron_pmpro_checkout_boxes() -{ - global $current_user, $wpdb, $pmpro_network_non_site_levels; +function pmpron_pmpro_checkout_boxes() { + global $current_user, $wpdb, $pmpro_network_non_site_levels, $current_site; + //Bail if it's not a multiste install + if(! isset( $current_site ) ) { + return; + } $level_id = null; @@ -156,7 +159,6 @@ function pmpron_pmpro_checkout_boxes() * domain ); if ( !is_subdomain_install() ) @@ -326,6 +328,11 @@ function pmpron_pmpro_save_membership_level( $level_id ) { //Display the setting for the number of site credits on the Edit Membership Level page function pmpron_pmpro_membership_level_after_other_settings() { + global $current_site; + //Bail if it's not a multisite install + if(! isset( $current_site ) ) { + return; + } $level_id = intval($_REQUEST['edit']); if($level_id > 0) { //want to specifically get the value from options here @@ -338,7 +345,7 @@ function pmpron_pmpro_membership_level_after_other_settings() { $pmpro_site_credits = ''; } ?> -

+