| @@ -42,10 +42,10 @@ | ||
| 42 | 42 | $options = new Options(); |
| 43 | 43 | |
| 44 | 44 | if ( ! empty( $options['version'] ) ) { |
| 45 | 45 | // Check if we will be able to upgrade. |
| 46 | - if ( version_compare( $options['version'], static::get_plugin_version(), '<' ) ) { | |
| 47 | - ( new PLL_Upgrade( $options ) )->can_activate(); | |
| 46 | + if ( version_compare( $options['version'], static::get_plugin_version(), '<' ) && ! ( new PLL_Upgrade( $options ) )->can_upgrade() ) { | |
| 47 | + return; | |
| 48 | 48 | } |
| 49 | 49 | } else { |
| 50 | 50 | $options['version'] = static::get_plugin_version(); |
| 51 | 51 | } |