Skip to content

Activating Masteriyo together with other plugins stops the request: the others are never activated (exit on activated_plugin) #34

Open

Description

@rodica-andronache

Description

When Masteriyo is activated, Eduacademy ends the whole PHP request. Admin::after_masteriyo_activation() (inc/Admin.php) runs on activated_plugin, marks the welcome notice as dismissed, and then calls exit. That works for the welcome notice's own button, which activates Masteriyo alone. But in every other case where Masteriyo is activated alongside other plugins, everything after it in the same request is cut off without any error:

  • Plugins → select several → Bulk actions → Activate: the plugins after Masteriyo in the list are not activated, and core never redirects back to the Plugins screen with its "Selected plugins activated." message.
  • WP-CLI (wp plugin activate a b c): the plugins after Masteriyo are not activated, and the command prints nothing, not even for Masteriyo, and gives no error.
  • Any code that runs after activate_plugin() for Masteriyo in the same request (a site setup tool, an importer, an onboarding wizard) stops there.

Masteriyo itself does end up active, because core saves active_plugins before activated_plugin fires.

Returning instead of exiting (and letting the welcome notice's JavaScript handle where to go next) would keep the notice dismissed without stopping other plugins' activation.

Step-by-step reproduction instructions

  1. On a site with Eduacademy 1.0.1 active, install Masteriyo (learning-management-system), Hello Dolly and Akismet, all inactive.
  2. Run wp plugin activate learning-management-system hello akismet, or on Plugins select the three and choose Bulk actions → Activate.

Expected: all three plugins are activated: WP-CLI says "Success: Activated 3 of 3 plugins.", and the Plugins screen reloads with "Selected plugins activated."
Actual: only Masteriyo is active. Hello Dolly and Akismet stay inactive. WP-CLI prints nothing and returns no error. On the Plugins screen the same thing should happen, since its bulk Activate calls activate_plugins() and redirects only after it returns: the request ends without the redirect.

With a default theme active, the same command activates all three.

Screenshots, screen recording, code snippet or Help Scout ticket

public function after_masteriyo_activation( $plugin ) {
    if ( 'learning-management-system/lms.php' !== $plugin ) {
        return;
    }

    update_option( Constants::CACHE_KEYS['dismissed-welcome-notice'], 'yes' );
    exit;
}

Reproduced on 2026-11-23 with WP-CLI, and with core's activate_plugins() (what the bulk action calls) through wp eval: the line after activate_plugins() never runs. The Plugins screen itself was not clicked through. With Twenty Twenty-Five active instead, the same WP-CLI command activated all three. Found while adding Eduacademy to the WordPress compatibility checks (Codeinwp/qa-compatibility#168), whose check 16 has to remove Masteriyo with its own commands because of this.

Environment info

Eduacademy 1.0.1 (built from the v1.0.1 tag), Masteriyo 3.5.2, WordPress 7.1.5, PHP 8.3, wp-env.

Is the issue you are reporting a regression

No

Activity

  1. added
    bug
    on Nov 23, 2026
  2. added theissue type on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions