diff --git a/changelog.txt b/changelog.txt index 2827539..4bb0542 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ * WordPress 6.7 compatible. * Adds fixes for "Translation loading for the ... domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. ..." PHP notices raised as of WordPress 6.7.0 in certain scenarios when translations are requested before the init or the after_setup_theme action have fired. * Avoids a potential infinite recursion when evaluating post counts. +* Make sure to present welcome screen only when Groups is activated alone and not in bulk. = 3.3.0 = * WordPress 6.7 compatible. diff --git a/lib/admin/class-groups-admin-welcome.php b/lib/admin/class-groups-admin-welcome.php index ccb8088..b607c74 100644 --- a/lib/admin/class-groups-admin-welcome.php +++ b/lib/admin/class-groups-admin-welcome.php @@ -83,12 +83,19 @@ public static function admin_init() { !$doing_cron && ( empty( $_GET['page'] ) || $_GET['page'] !== 'groups-welcome' ) && !is_network_admin() && - !isset( $_GET['activate-multi'] ) && + isset( $_REQUEST['activate'] ) && // @since 3.3.1 must be single activation + !isset( $_REQUEST['activate-multi'] ) && + !isset( $_REQUEST['activate-selected'] ) && // @since 3.3.1 must not be multiple activation + !isset( $_REQUEST['update-selected'] ) && // @since 3.3.1 must not be multiple update Groups_User::current_user_can( GROUPS_ACCESS_GROUPS ) && apply_filters( 'groups_welcome_show', true ) ) { wp_safe_redirect( admin_url( 'index.php?page=groups-welcome' ) ); exit; + } else { + // @since 3.3.1 remove transients as we don't want to trigger a redirect in any other case than direct activation of the Groups plugin, also see above + delete_transient( 'groups_plugin_activated' ); + delete_transient( 'groups_plugin_updated_legacy' ); } } }