diff --git a/mu-plugins/10up-plugin/includes/classes/ModuleInitialization.php b/mu-plugins/10up-plugin/includes/classes/ModuleInitialization.php index b5a8ea87..bf22ec64 100644 --- a/mu-plugins/10up-plugin/includes/classes/ModuleInitialization.php +++ b/mu-plugins/10up-plugin/includes/classes/ModuleInitialization.php @@ -56,7 +56,9 @@ private function __construct() { * @return array */ protected function get_classes() { - return ClassFinder::getClassesInNamespace( 'TenUpPlugin', ClassFinder::RECURSIVE_MODE ); + $class_finder = new ClassFinder(); + $class_finder::setAppRoot( TENUP_PLUGIN_PATH ); + return $class_finder::getClassesInNamespace( 'TenUpPlugin', ClassFinder::RECURSIVE_MODE ); } /** diff --git a/themes/10up-theme/includes/classes/ModuleInitialization.php b/themes/10up-theme/includes/classes/ModuleInitialization.php index a80628ba..ce71761f 100644 --- a/themes/10up-theme/includes/classes/ModuleInitialization.php +++ b/themes/10up-theme/includes/classes/ModuleInitialization.php @@ -56,7 +56,9 @@ private function __construct() { * @return array */ protected function get_classes() { - return ClassFinder::getClassesInNamespace( 'TenUpTheme', ClassFinder::RECURSIVE_MODE ); + $class_finder = new ClassFinder(); + $class_finder::setAppRoot( TENUP_THEME_PATH ); + return $class_finder::getClassesInNamespace( 'TenUpTheme', ClassFinder::RECURSIVE_MODE ); } /**