/**
  * Install actions such as installing pages when a button is clicked.
  */
 public static function install_actions()
 {
     if (!empty($_GET['do_update_wpclubmanager'])) {
         self::update();
         // Update complete
         WPCM_Admin_Notices::remove_notice('update');
         // What's new redirect
         delete_transient('_wpcm_activation_redirect');
         wp_redirect(admin_url('index.php?page=wpcm-about&wpcm-updated=true'));
         exit;
     }
 }
 /**
  * Sends user to the welcome page on first activation
  */
 public function welcome()
 {
     // Bail if no activation redirect transient is set
     if (!get_transient('_wpcm_activation_redirect')) {
         return;
     }
     // Delete the redirect transient
     delete_transient('_wpcm_activation_redirect');
     // Bail if we are waiting to install or update via the interface update/install links
     if (WPCM_Admin_Notices::has_notice('update')) {
         return;
     }
     // Bail if activating from network, or bulk, or within an iFrame
     if (is_network_admin() || isset($_GET['activate-multi']) || defined('IFRAME_REQUEST')) {
         return;
     }
     // if ( ( isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action'] ) || ( ! empty( $_GET['page'] ) && $_GET['page'] === 'wpcm-about' ) ) {
     // 	return;
     // }
     // wp_redirect( admin_url( 'index.php?page=wc-about' ) );
     // exit;
     $upgrade = get_option('wpcm_version_upgraded_from');
     if (!$upgrade) {
         // First time install
         wp_safe_redirect(admin_url('index.php?page=wpcm-getting-started'));
         exit;
     } else {
         // Update
         wp_safe_redirect(admin_url('index.php?page=wpcm-about'));
         exit;
     }
 }