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

Remove redundant update code #147

Open
timbocode opened this issue Dec 18, 2019 · 3 comments
Open

Remove redundant update code #147

timbocode opened this issue Dec 18, 2019 · 3 comments
Labels
On-Hold Need some more work before review
Milestone

Comments

@timbocode
Copy link
Contributor

Regarding includes/wc-update-functions.php and includes/class-wc-install.php, is there a lot of redundant code we can get rid of?

Could everything except the code added above (i.e. everything not related to WC 3.5.3) be removed from both of these files?

Can anyone see any adverse implications of doing this?

This in itself brings a new issue. There is code for WC < 3.0. Do we want to maintain this? If we have an answer for this we can then sort out that issue of redundant code too.

Originally posted by @bahiirwa in #143 (comment)

@timbocode
Copy link
Contributor Author

timbocode commented Dec 18, 2019

I was just in the process of doing a PR for this.

I think there are two separate issues.

Maintaining compatibility for WC < 3.0 is one issue.

But the issue I referred to only affects updates.

The question I am asking is: does the update code in includes/wc-update-functions.php and includes/class-wc-install.php only affect existing WC installations where someone is updating WooCommerce to a later version?

If you installed a clean copy of WooCommerce 3.5.3, would this update code still be required?

EDIT: the code I'm referring to is basically everything in includes/wc-update-functions.php except for the newly added wc_update_353_db_version() function and everything in the $db_updates array in class-wc-install.php except for the '3.5.3' element.

@timbocode timbocode added the question Further information is requested label Dec 18, 2019
@bahiirwa
Copy link
Collaborator

bahiirwa commented Dec 18, 2019

For a clean install, simple answer is no effect whatsoever.

These have an effect if you are moving from an older WC to CC or WC 3.5.3. I am thinking of the folks who have not touched their e-commerce for ages since let's say 3.0.0 and have now chosen to move CC. They need to update their DB.

Questions:

  1. Do we want to support those?
  2. Is this something we should move to a compat plugin?

Answering the above will lead to move code that can be removed as being redundant in code base. It is a big decision. However, initially, we had wanted to have a WC-3.5.3 backward compatible plugin. We could reserve this for CC-2.0.0

@timbocode
Copy link
Contributor Author

OK, I see your point. Let's leave it as it is for now and tag it for 2.0.

@bahiirwa bahiirwa added this to the Version 2.0.0 milestone Dec 18, 2019
@bahiirwa bahiirwa added On-Hold Need some more work before review and removed question Further information is requested labels Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On-Hold Need some more work before review
Projects
None yet
Development

No branches or pull requests

2 participants