Open ntwb opened 8 years ago
@bamadesigner Have you had a chance to look at this at all?
@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.
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.
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