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
Change version of WooCommerce reported by CC to 3.5.3 #143
Comments
Can someone review? The only change I've made, and all that seems necessary, is to set
in |
Change looks fine in |
Yeah, my mistake. I'll explain on Slack. Do you want to go ahead and close this? |
Reopened pending new PR. |
The database message will be because the db version has been bumped from 0.1.0 to 3.5.3. I don't know why it should white screen. It worked when I was testing it. I will check this tomorrow. Re CC version. The CC version and the WC version can be independent of each other. We can start CC at 1.0.0 but ensure that it reports the WC version as 3.5.3. This is the same principle used in ClassicPress. CP is at 1.1.2 but reports version 4.9.x of WP. |
Turned on debugging and got this: |
I've just downloaded a fresh copy of CC and updated all the files on the site. Now when I change version to 3.5.3 it doesn't prompt me to update the database (and hence there is no error message). I must have had an old version of some files in there. However, it is still confusing as the plugin page shows CC version 0.1.0, the status page shows CC version 3.5.3 and database version 0.1.0 (but the help message tells me these two should be the same). |
The update issue is interesting. We can add an HTML text In file to show this is WC 3.5.3 to remove confusion. The plugin version needs to be traceable so 0.1.0 will be fine. |
Is there some way to change the status page so it gets the version from the same place as the plugin page? |
At the moment it is using this value |
Plugin gets version from the comments /**/ on the first file while the status picks from the variable updated via PR. Making it dynamic means we use something like plugin_data(). Ref https://wordpress.stackexchange.com/questions/18268/i-want-to-get-a-plugin-version-number-dynamically |
OK - I'll leave that to you coding people. 😉 |
The reason why the updater gives a white screen and the reason for the ' In function
and then the following function needs to be added:
|
To update the database ( Add the following to includes/wc-update-functions.php:
Add the following to includes/class-wc-install.php:
at the end of the |
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? |
Yes, that's good! Let's do that. Both values will be useful to have in a report. |
New issue created #145 |
PR #146 Still need thoughts on comment re redundant code above. |
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. |
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 |
I'll move this to a new issue as #143 is closed. |
Describe the bug
See #131.
Plugins use a number of different methods to determine the version of WC that is active. Such plugins often require a minimum version of WC in order to a) activate and/or b) function correctly. At present, Classic Commerce reports version 1.0.0, the version of CC, rather than the version of WC it was forked from. Consequently, many plugins fail to activate.
This requires changes to the following as a minimum:
To Reproduce
Try to activate a plugin the requires WC >= 3.0 (for example).
Screenshots
Example:
Expected behavior
Plugins checking for WC <= 3.5.3 should activate without error.
The text was updated successfully, but these errors were encountered: