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

Run plugin updates when needed #2497

Merged
merged 1 commit into from Mar 22, 2019

Conversation

Projects
None yet
3 participants
@jom
Copy link
Member

commented Mar 21, 2019

This runs updates when the recorded version in the database doesn't match the current plugin version.

Currently it just updates sensei-version (so the compatibility plugin loads WCPC), but we could add additional steps from one of Sensei's three activation methods:
Sensei_Main::activate()
Sensei_Main::activate_sensei()
Sensei_Main::activation()

Outside of this PR, I think we should consolidate these activation methods

@jom jom added the [Type] Bug label Mar 21, 2019

@jom jom added this to the 2.0.0 milestone Mar 21, 2019

@jom jom requested review from alexsanford and donnapep Mar 21, 2019

@donnapep

This comment has been minimized.

Copy link
Contributor

commented Mar 22, 2019

Do we need to worry about woothemes-sensei-version at all? Would it ever be possible that version was set but not the sensei-version one?

@jom

This comment has been minimized.

Copy link
Member Author

commented Mar 22, 2019

Do we need to worry about woothemes-sensei-version at all? Would it ever be possible that version was set but not the sensei-version one?

I don't think we do. It will always be less than 2.0.0 so we would always want to execute the code. I tested what version_compare does with false and we should be safe.
version_compare( '2.0.0', false, '>' ) === true

@alexsanford
Copy link
Contributor

left a comment

This works for me! 💯

@jom jom merged commit d411a77 into release/2.0 Mar 22, 2019

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details

@jom jom deleted the update/version-on-update branch Mar 22, 2019

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.