| @@ -31,8 +31,17 @@ | ||
| 31 | 31 | $this->database = Database::get_instance(); |
| 32 | 32 | $nx_free_version = $this->database->get_option('nx_free_version'); |
| 33 | 33 | $nx_db_version = $this->database->get_option('nx_db_version'); |
| 34 | 34 | |
| 35 | + // Backward compatibility: installs that already ran NotificationX | |
| 36 | + // before the first-activation flag existed must not be treated as a | |
| 37 | + // first-ever activation when they are re-activated, or they would be | |
| 38 | + // pushed into the Setup Wizard again. A stored free version proves the | |
| 39 | + // plugin has run here before, so seed the flag once. | |
| 40 | + if ( $nx_free_version && ! NotificationX::has_activated_before() ) { | |
| 41 | + update_option( NotificationX::FIRST_ACTIVATION_OPTION, time(), 'no' ); | |
| 42 | + } | |
| 43 | + | |
| 35 | 44 | // Show milestone notification only for 3.1.10 |
| 36 | 45 | $force_milstone = get_option('notificationx_force_milestone', ''); |
| 37 | 46 | if ( version_compare( NOTIFICATIONX_VERSION, '3.1.10', '==' ) && empty($force_milstone) ) { |
| 38 | 47 | delete_option('notificationx_milestone_level'); |