Skip to content

Commit

Permalink
Plugin_Toggler::activate_plugin(): bug fix
Browse files Browse the repository at this point in the history
The second (`$redirect`) parameter for `activate_plugin()` expects a string, not `null`.

Ref: https://developer.wordpress.org/reference/functions/activate_plugin/
  • Loading branch information
jrfnl authored and enricobattocchi committed Nov 25, 2023
1 parent 3b74fcd commit 395d8bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin-toggler.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ private function activate_plugin( $group, $plugin ) {
}

$plugin_path = $this->plugin_groups[ $group ][ $plugin ];
\activate_plugin( \plugin_basename( $plugin_path ), null, false, true );
\activate_plugin( \plugin_basename( $plugin_path ), '', false, true );
}

/**
Expand Down

0 comments on commit 395d8bf

Please sign in to comment.