diff --git a/functions.php b/functions.php index a67dc06..15d444b 100755 --- a/functions.php +++ b/functions.php @@ -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() ) { diff --git a/js/wp-autoupdates.js b/js/wp-autoupdates.js index 52b84c7..034643b 100644 --- a/js/wp-autoupdates.js +++ b/js/wp-autoupdates.js @@ -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 ),