From ef97e5b8d2777e53e5fb876bef93ba8e865d61c1 Mon Sep 17 00:00:00 2001 From: maximilianoRicoTabo Date: Tue, 22 Oct 2024 18:06:57 -0300 Subject: [PATCH 1/2] ENHANCEMENT: Make h3 and h2 the "Site credits" title in the other settings section in the level settings page --- pmpro-network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmpro-network.php b/pmpro-network.php index d7aa1df..81c5ed9 100644 --- a/pmpro-network.php +++ b/pmpro-network.php @@ -338,7 +338,7 @@ function pmpron_pmpro_membership_level_after_other_settings() { $pmpro_site_credits = ''; } ?> -

+

From ddbee6eae0982ad06b67096dae2e0d7d89353b8b Mon Sep 17 00:00:00 2001 From: maximilianoRicoTabo Date: Thu, 24 Oct 2024 18:25:53 -0300 Subject: [PATCH 2/2] * Bail if it's not a multisite --- pmpro-network.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pmpro-network.php b/pmpro-network.php index 81c5ed9..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