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

Incorrect plugin and theme update notifications #8

Open
ntwb opened this issue Feb 26, 2016 · 2 comments
Open

Incorrect plugin and theme update notifications #8

ntwb opened this issue Feb 26, 2016 · 2 comments

Comments

@ntwb
Copy link

ntwb commented Feb 26, 2016

After a plugin has been updated this is what is seen:
The following WordPress plugin has been updated by admin on the sp.dev website at http://sp.dev.
The following WordPress theme has been updated by admin on the sp.dev website at http://sp.dev.

When a plugin update is available works as expected, though no notification is seen for a theme update being available. Per the screenshot below I would have expected to see a similar notification for the theme similar to the plugin notification, I also expect that both the plugin and theme updated notifications should be more verbose.

screen shot 2016-02-26 at 6 24 40 pm

Note: I tested both a plugin and theme my manually lowering the version number in the plugin/theme manually and then updating via the normal WordPress process

@briandeconinck
Copy link

@bamadesigner Have you had a chance to look at this at all?

@texinick
Copy link

texinick commented Mar 3, 2017

@briandeconinck Until an update is available, I resolved this issue on my WP installation by changing the following in wp-content/plugins/rock-the-slackbot/includes/hooks.php:

On line 821, change:

if ( 'core' != $upgrade_type ) {

to

if ( 'core' == $upgrade_type ) {

The above forces Rock the Slackbot into the correct part of the code, but will then cause a problem when updating a theme, so in order to at least make it work, I did the following:

On line 866, I changed:

$previous_version = ( 'plugin' == $upgrade_type) ? ( ! empty( $item_pre_upgrade_info['Version'] ) ? $item_pre_upgrade_info['Version'] : false ) : $item_pre_upgrade_info->get( 'Version' );

to

$previous_version = ( 'plugin' == $upgrade_type || 'theme' == $upgrade_type) ? ( ! empty( $item_pre_upgrade_info['Version'] ) ? $item_pre_upgrade_info['Version'] : false ) : $item_pre_upgrade_info->get( 'Version' );

Now the plugin and theme update notifications work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants