Skip to content

Commit

Permalink
Merge pull request #3168 from ravinderk/issues/3155
Browse files Browse the repository at this point in the history
fix(admin-plugins): update notice shouldn't display when actively updating add-ons #3155
  • Loading branch information
Devin Walker committed May 3, 2018
2 parents dfde239 + bc5f40c commit 700b3be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/admin/upgrades/class-give-updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,8 @@ public function __health_background_update( $give_updates ) {
* @access public
*/
public function __show_notice() {
$current_screen = get_current_screen();

// Bailout.
if ( ! current_user_can( 'manage_give_settings' ) ) {
return;
Expand All @@ -596,7 +598,7 @@ public function __show_notice() {


// Bailout.
if ( isset( $_GET['page'] ) && 'give-updates' === $_GET['page'] ) {
if ( in_array( $current_screen->base, array( 'give_forms_page_give-updates', 'update-core' ) ) ) {
return;
}

Expand Down

0 comments on commit 700b3be

Please sign in to comment.