public function checkSetup($page = false)
 {
     global $pagenow;
     // check if cURL is loaded
     if (!self::isCurlLoaded()) {
         return false;
     }
     // check for windows server
     // if ( self::isWindowsServer() ) return false;
     self::isWindowsServer($page);
     // create folders if neccessary
     // if ( self::checkFolders() ) return false;
     // check for updates
     self::checkForUpdates();
     // check if cron is working properly
     self::checkCron();
     // check if PHP, WooCommerce and WP are up to date
     self::checkVersions();
     // check for multisite installation
     // if ( self::checkMultisite() ) return false;
     // setup wizard
     // if ( self::getOption('amazon_token') == '' ) {
     if ('1' == self::getOption('setup_next_step') && $page != 'settings') {
         $msg1 = __('You have not linked WP-Lister to your Amazon account yet.', 'wpla');
         $msg2 = __('To complete the setup procedure go to %s and follow the instructions.', 'wpla');
         $link = '<a href="admin.php?page=wpla-settings">' . __('Settings', 'wpla') . '</a>';
         $msg2 = sprintf($msg2, $link);
         $msg = "<p><b>{$msg1}</b></p><p>{$msg2}</p>";
         wpla_show_message($msg);
         // update_option('wpla_setup_next_step', '0');
     }
     // db upgrade
     WPLA_UpgradeHelper::upgradeDB();
     // clean db
     // self::cleanDB();
 }
 public function upgradeTablesUTF8MB4()
 {
     global $wpdb;
     // get list of our tables
     $tables = $wpdb->get_col("SHOW TABLES LIKE '{$wpdb->prefix}amazon_%'");
     if (empty($tables)) {
         wpla_show_message('no tables found.', 'error');
         return;
     }
     // convert all tables
     foreach ($tables as $table) {
         $converted = WPLA_UpgradeHelper::convert_custom_table_to_utf8mb4($table);
         if ($converted) {
             wpla_show_message('Table <i>' . $table . '</i> was converted.');
         } else {
             wpla_show_message('Table <i>' . $table . '</i> was not converted.', 'error');
         }
     }
 }