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
Build extension updater class #400
Comments
- Add admin_menu callback to admin - Added require_once for extension file to WP_Stream - Created base WP_Stream_Extension class - Skeleton class methods to handle displaying, activating, downloading, authorizing premium extensions - Should update routine #400 be initiated here?
…dates - skeleton check_for_extension_updates method - #400 could use this?
I think this is what's happening currently.
This means we will have to use an alternate store to keep version updates separately from WP update API, which i think we should try to avoid. Instead, showing the notice/error if the user tries to update a premium extension, as in:
should be sufficient to remind the user he needs to connect the site to his premium account, and would work using the standard update api integration of WP, for stability. @fjarrett What do you think ? |
@shadyvb I totally agree. Sounds great! |
@shadyvb Will it be possible for this to be delivered today? Hoping to start thorough testing tonight with the whole team. |
@shadyvb When can we start testing this? |
@fjarrett I'll start cracking at this right now, been waiting for @c3mdigital to give the green light but seems he's got a lot on his plate. |
@fjarrett This is as far as i can get with the notice, since the text is hardcoded, i can only add to it. |
@fjarrett FYI, Now the update won't be attempted to begin with, if there is no license key, as there won't be a package URL that WordPress can attempt to download. |
@fjarrett Since WordPress is handling download of package URLs automatically, i don't think i have a chance of tapping into the process and providing meaningful error messages. |
Scratch that, found |
@shadyvb So are you saying we won't be able to show updates are available at all unless a license key is in the DB? The hope would be that merely checking for the latest version would not require any authentication. |
No, the update will show ( as in the screenshot ) but users won't be able to actually hit 'Update' because there is no package url, ie: WordPress does not know where to update this from. Which is actually what we need. |
@shadyvb OK got it. |
@fjarrett I don't think the last Task can be done, have dived in the code and WP does not offer proper actions/filters to hook into the download process if things go bad. If you agree, I'll issue a PR to get this one finished, finally. |
As first discussed in https://github.com/x-team/wp-stream-reports/issues/5, we need to include an updater inside core Stream that will handle updates for extensions from a centralized class.
This should integrate with the work being done on #396.
wp_die
message if an update is attempted on an extension but the license ke is invalid or does not exist. The message should be relevant to the error that occurred (e.g. You have reached your site limit for automatic updates).The text was updated successfully, but these errors were encountered: