time() ) { return false; } $report = $this->get_report(); $sessions = isset( $report['data']['infobox']['sessions']['value'] ) ? $report['data']['infobox']['sessions']['value'] : 0; // If the user has less than 500 sessions. if ( $sessions < 500 ) { return false; } $notification['title'] = __( "Congrats! You've hit 500 monthly sessions!", 'google-analytics-for-wordpress' ); // Translators: upgrade to pro notification content $notification['content'] = __( 'Folks like you who upgrade to MonsterInsights Pro get access to advanced reporting, powerful integrations to help you grow even more!', 'google-analytics-for-wordpress' ); $notification['btns'] = array( "upgrade_to_pro" => array( 'url' => $this->get_upgrade_url(), 'text' => __( 'Upgrade Now', 'google-analytics-for-wordpress' ), 'is_external' => true, ), ); update_option('monsterinsights_notification_upgrade_to_pro_five_hundred_session_last_added', time()); return $notification; } } // initialize the class new MonsterInsights_Notification_Upgrade_To_Pro_Five_Hundred_Session();