Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #130 from WordPress/fix/non-ajax-plugin-enable-adm…
Browse files Browse the repository at this point in the history
…in-notice-incorrect

Fix incorrect admin notice text when auto-updates are enabled for a plugin when JS is not enabled in the browser
  • Loading branch information
pbiron authored May 16, 2020
2 parents 289854f + b3a692c commit 36ebad4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ function wp_autoupdates_handle_plugins_enable_disable() {

update_site_option( 'wp_auto_update_plugins', $auto_updates );

wp_redirect( self_admin_url( "plugins.php?disable-auto-update=true&plugin_status=$status&paged=$page&s=$s" ) );
wp_redirect( self_admin_url( "plugins.php?enable-auto-update=true&plugin_status=$status&paged=$page&s=$s" ) );
exit;
} elseif ( 'disable-auto-update' === $_GET['action'] ) {
if ( ! current_user_can( 'update_plugins' ) || ! wp_autoupdates_is_plugins_auto_update_enabled() ) {
Expand Down
4 changes: 2 additions & 2 deletions js/wp-autoupdates.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
'use strict';

$( document ).ready( function() {
$( '.column-auto-updates, .theme-overlay' ).on(
$( document ).on(
'click',
'.toggle-auto-update',
'.column-auto-updates a.toggle-auto-update, .theme-overlay a.toggle-auto-update',
function( event ) {
var data, asset, type,
$anchor = $( this ),
Expand Down

0 comments on commit 36ebad4

Please sign in to comment.