diff --git a/class.jetpack-debugger.php b/class.jetpack-debugger.php index 3b7d25e66ad8d..7e1fe5b8ded67 100644 --- a/class.jetpack-debugger.php +++ b/class.jetpack-debugger.php @@ -18,6 +18,12 @@ private static function is_jetpack_support_open() { } } + private static function what_jetpack_plan() { + $plan = Jetpack::get_active_plan(); + $plan = ! empty( $plan['class'] ) ? $plan['class'] : 'undefined'; + return 'JetpackPlan' . $plan; + } + static function seconds_to_time( $seconds ) { $units = array( "week" => 7*24*3600, @@ -80,6 +86,7 @@ public static function jetpack_debug_display_handler() { $debug_info .= "\r\n" . esc_html( "JETPACK__PLUGIN_DIR: " . JETPACK__PLUGIN_DIR ); $debug_info .= "\r\n" . esc_html( "SITE_URL: " . site_url() ); $debug_info .= "\r\n" . esc_html( "HOME_URL: " . home_url() ); + $debug_info .= "\r\n" . esc_html( "PLAN: " . self::what_jetpack_plan() ); $debug_info .= "\r\n"; require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-modules.php'; diff --git a/class.jetpack.php b/class.jetpack.php index 0eb12002b7c64..1fd74dfe303bf 100644 --- a/class.jetpack.php +++ b/class.jetpack.php @@ -1219,7 +1219,8 @@ public static function get_active_plan() { if ( ! $plan ) { $plan = array( 'product_slug' => 'jetpack_free', - 'supports' => array(), + 'supports' => array(), + 'class' => 'free', ); } @@ -1233,6 +1234,7 @@ public static function get_active_plan() { $plan['supports'] = array( 'akismet', ); + $plan['class'] = 'personal'; } // Define what paid modules are supported by premium plans @@ -1248,6 +1250,7 @@ public static function get_active_plan() { 'vaultpress', 'wordads', ); + $plan['class'] = 'premium'; } // Define what paid modules are supported by professional plans @@ -1265,6 +1268,7 @@ public static function get_active_plan() { 'google-analytics', 'wordads', ); + $plan['class'] = 'business'; } // Make sure we have an array here in the event database data is stale