From 40c45c2a0c2b5a12751ab773953a10ae7c2ccf1d Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Mon, 17 Feb 2025 21:38:43 +0530 Subject: [PATCH 1/2] Bulk Update no Longer Working When 1 Plugin Failed Update --- src/js/_enqueues/wp/updates.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js index ef4b47e66093e..c97b49fd65ad3 100644 --- a/src/js/_enqueues/wp/updates.js +++ b/src/js/_enqueues/wp/updates.js @@ -629,6 +629,7 @@ wp.updates.updatePluginError = function( response ) { var $pluginRow, $card, $message, errorMessage, buttonText, ariaLabel, $adminBarUpdates = $( '#wp-admin-bar-updates' ); + isPluginInstall = 'plugin-install' === pagenow || 'plugin-install-network' === pagenow; if ( ! wp.updates.isValidResponse( response, 'update' ) ) { return; @@ -667,7 +668,7 @@ } else { $message.find( 'p' ).removeAttr( 'aria-label' ); } - } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { + } else if ( isPluginInstall ) { buttonText = __( 'Update failed.' ); $card = $( '.plugin-card-' + response.slug + ', #plugin-information-footer' ) @@ -716,7 +717,7 @@ wp.a11y.speak( errorMessage, 'assertive' ); - if ( 'plugin-information-footer' === $card.attr('id' ) ) { + if ( isPluginInstall && 'plugin-information-footer' === $card.attr( 'id' ) ) { wp.updates.setCardButtonStatus( { status: 'plugin-update-failed', From 85b59b3b017669d7dc964b223dc2783e1b417341 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Mon, 17 Feb 2025 21:56:44 +0530 Subject: [PATCH 2/2] Bulk Update no Longer Working When 1 Plugin Failed Update --- src/js/_enqueues/wp/updates.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js index c97b49fd65ad3..6ba3ed64bfde0 100644 --- a/src/js/_enqueues/wp/updates.js +++ b/src/js/_enqueues/wp/updates.js @@ -628,7 +628,7 @@ */ wp.updates.updatePluginError = function( response ) { var $pluginRow, $card, $message, errorMessage, buttonText, ariaLabel, - $adminBarUpdates = $( '#wp-admin-bar-updates' ); + $adminBarUpdates = $( '#wp-admin-bar-updates' ), isPluginInstall = 'plugin-install' === pagenow || 'plugin-install-network' === pagenow; if ( ! wp.updates.isValidResponse( response, 'update' ) ) {