1

On multisite, setting the WP_INSTALLING constant on wp-activate.php file disables all plugins prematurely. Why didn't the core create a way to bypass this. Though this may be required for activating new sites, but by default when activating a new user, the WP_INSTALLING constants should be disabled.

4
  • Why are you visiting that file directly? What are you trying to do that has lead to this? Have you made modifications to WP core files? Keep in mind this site is not a discussion forum it's a Question Answer site, I'm not sure what your question is, can you edit it to state clearly a specific question that can be factually answered?
    – Tom J Nowell
    Jul 17, 2020 at 9:01
  • No, I didn't visit the page directly, I was testing multisite event behaviors on new user registration, so I used the activation link to activate the user but noticed wpmu_new_user, add_user_to_blog and wp_activate_user actions never get called and the reason is that at the top of wp-activate.php file the WP installing constant was defined: define('WP_INSTALLING', true); Jul 17, 2020 at 9:12
  • So are you asking for a way to get around that and run code on those hooks? What did the code you were testing for those hoks look like? And where was it located? The location matters more than it normally would, so the solution may be to move it to a particular place, such as an mu plugin or a dropin
    – Tom J Nowell
    Jul 17, 2020 at 9:19
  • 1
    Not really, I could do that. What I wanted to understand is why the core team designed it that way. Jul 17, 2020 at 9:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.