Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
fix(update): fixes update settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Campaña committed Jan 30, 2019
1 parent bb75cf8 commit 7632455
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions wp-pwa.php
Original file line number Diff line number Diff line change
Expand Up @@ -828,16 +828,10 @@ function frontity_initialize_settings() {
}

function frontity_update_settings() {
frontity_initialize_settings();
$settings = get_option('frontity_settings');
$old_settings = get_option('wp_pwa_settings');

// Initialize settings when the plugin is updated
// but was already activated (update doesn't trigger activation hook).
if (!$settings) {
frontity_initialize_settings();
$settings = get_option('frontity_settings');
}

// If there are settings from the previous versions of the plugin
// map them into the new settings and delete the old settings.
if ($old_settings) {
Expand Down

0 comments on commit 7632455

Please sign in to comment.