Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#32368 closed defect (bug) (fixed)

Can't activate other plugins within the plugin activation handler

Reported by: dd32's profile dd32 Owned by: dd32's profile dd32
Milestone: 4.3 Priority: normal
Severity: normal Version:
Component: Plugins Keywords: has-patch
Focuses: Cc:


At present it's impossible to activate another plugin during a plugin activation handler.

The issue occurs because we fetch the option before running the activation handler, and then set it after the handler has run, so another activate_plugin() running in that handler is ignored (although the other plugins activation handlers will run).

Although it could be argued that plugins shouldn't activate other plugins, sometimes they're required or it's a better user experience to activate them at the same time.

Attachments (1)

32368.diff (1.4 KB) - added by dd32 9 years ago.

Download all attachments as: .zip

Change History (2)

9 years ago

#1 @dd32
9 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 32504:

Allow plugins to activate other plugins within their Activation hook. Fixes #32368

Note: See TracTickets for help on using tickets.