Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sayedtaqui opened this issue Feb 25, 2017 · 0 comments

Comments

Projects
None yet
3 participants
@sayedtaqui
Copy link
Collaborator

commented Feb 25, 2017

"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...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.