xwp / wp-customize-snapshots

Customize Snapshots WordPress Plugin
https://wordpress.org/plugins/customize-snapshots/
52 stars 11 forks source link

Migrate to changesets notice also shows when somebody has directly installed WordPress > 4.7 #123

Closed mohdsayed closed 7 years ago

mohdsayed commented 7 years ago

"Existing Snapshots need to be migrated to Changesets, which was added to core in WordPress 4.7." notice should not show if somebody has directly installed WordPress > 4.7, or there are no changesets to migrate.

May be we can do this here https://github.com/xwp/wp-customize-snapshots/blob/develop/php/class-migrate.php#L51-L57

if ( ! $this->is_migrated() ) {
    if ( empty( $this->changeset_migrate( 1, true ) ) ) {
        update_option( self::KEY, 1 );
        return;
    }
    // Add actions...
}