Skip to content

Commit

Permalink
Merge pull request #178 from newfold-labs/PRESS-2-658-Skip-Plugins-th…
Browse files Browse the repository at this point in the history
…at-are-active

Checks to prevent re-queuing plugins
  • Loading branch information
arunshenoy99 authored Feb 23, 2023
2 parents 0960800 + 4fbad17 commit 086e610
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/RestApi/PluginsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ public function set_site_features( \WP_REST_Request $request ) {

foreach ( $plugins as $plugin => $decision ) {
if ( $decision ) {
// If the Plugin exists and is activated
if ( PluginInstaller::exists( $plugin, $decision ) ) {
continue;
}

PluginInstallTaskManager::add_to_queue(
new PluginInstallTask(
$plugin,
Expand Down

0 comments on commit 086e610

Please sign in to comment.