diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js index 11f367b934..f3cea6dd85 100644 --- a/src/js/_enqueues/wp/updates.js +++ b/src/js/_enqueues/wp/updates.js @@ -2664,41 +2664,16 @@ } ); /** - * Click handler for plugin activations in plugin activation view. + * Click handler for plugin activations in plugin activation modal view. * * @since 6.5.0 + * @since 6.5.4 Redirect the parent window to the activation URL. * * @param {Event} event Event interface. */ - $pluginFilter.on( 'click', '.activate-now', function( event ) { - var $activateButton = $( event.target ); - + $document.on( 'click', '#plugin-information-footer .activate-now', function( event ) { event.preventDefault(); - - if ( $activateButton.hasClass( 'activating-message' ) || $activateButton.hasClass( 'button-disabled' ) ) { - return; - } - - $activateButton - .removeClass( 'activate-now button-primary' ) - .addClass( 'activating-message' ) - .attr( - 'aria-label', - sprintf( - /* translators: %s: Plugin name. */ - _x( 'Activating %s', 'plugin' ), - $activateButton.data( 'name' ) - ) - ) - .text( __( 'Activating...' ) ); - - wp.updates.activatePlugin( - { - name: $activateButton.data( 'name' ), - slug: $activateButton.data( 'slug' ), - plugin: $activateButton.data( 'plugin' ) - } - ); + window.parent.location.href = $( event.target ).attr( 'href' ); }); /**