Skip to content

Commit

Permalink
Get the default to be activated plugins dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
officiallygod committed Jan 15, 2024
1 parent 37d9d33 commit f778abd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions includes/Plugins.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php
namespace NewfoldLabs\WP\Module\Onboarding\Data;

use function NewfoldLabs\WP\ModuleLoader\container;
use NewfoldLabs\WP\Module\Installer\Data\Plugins as PluginsInstaller;

/**
* List of Plugin Slugs/URLs/Domains
*/
Expand Down Expand Up @@ -233,4 +236,15 @@ public static function wc_prevent_redirect_on_activation() {
\delete_transient( '_wc_activation_redirect' );
}

/**
* List of plugins that should stay active even with the filter option
*
* @return array
*/
public static function get_active_plugins_list() {
return array(
container()->plugin()->basename,
isset( PluginsInstaller::get_wp_slugs()['woocommerce']['path'] ) ? PluginsInstaller::get_wp_slugs()['woocommerce']['path'] : false,
);
}
}

0 comments on commit f778abd

Please sign in to comment.