Skip to content

Commit 40c45c2

Browse files
committed
Bulk Update no Longer Working When 1 Plugin Failed Update
1 parent 353b042 commit 40c45c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/js/_enqueues/wp/updates.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@
629629
wp.updates.updatePluginError = function( response ) {
630630
var $pluginRow, $card, $message, errorMessage, buttonText, ariaLabel,
631631
$adminBarUpdates = $( '#wp-admin-bar-updates' );
632+
isPluginInstall = 'plugin-install' === pagenow || 'plugin-install-network' === pagenow;
632633

633634
if ( ! wp.updates.isValidResponse( response, 'update' ) ) {
634635
return;
@@ -667,7 +668,7 @@
667668
} else {
668669
$message.find( 'p' ).removeAttr( 'aria-label' );
669670
}
670-
} else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
671+
} else if ( isPluginInstall ) {
671672
buttonText = __( 'Update failed.' );
672673

673674
$card = $( '.plugin-card-' + response.slug + ', #plugin-information-footer' )
@@ -716,7 +717,7 @@
716717

717718
wp.a11y.speak( errorMessage, 'assertive' );
718719

719-
if ( 'plugin-information-footer' === $card.attr('id' ) ) {
720+
if ( isPluginInstall && 'plugin-information-footer' === $card.attr( 'id' ) ) {
720721
wp.updates.setCardButtonStatus(
721722
{
722723
status: 'plugin-update-failed',

0 commit comments

Comments
 (0)