From 3ae552ac8b2898d077bc49190c768def1abb2bab Mon Sep 17 00:00:00 2001 From: Asad Nur Date: Fri, 17 Jan 2025 10:22:13 +0600 Subject: [PATCH] fix: Black recommended plugins page in case all of the recommended page already installed --- includes/Admin/SetupWizard.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/includes/Admin/SetupWizard.php b/includes/Admin/SetupWizard.php index 06253b1f8b..a23a139bf9 100644 --- a/includes/Admin/SetupWizard.php +++ b/includes/Admin/SetupWizard.php @@ -26,6 +26,15 @@ class SetupWizard { */ private $deferred_actions = []; + /** + * Instance of RecommendedPlugins class for managing plugin recommendations. + * + * @since DOKAN_SINCE + * + * @var RecommendedPlugins Handles the retrieval and management of recommended plugins + */ + private RecommendedPlugins $recommended_plugins; + /** * Hook in tabs. */ @@ -35,6 +44,8 @@ public function __construct() { } if ( current_user_can( 'manage_woocommerce' ) ) { + $this->recommended_plugins = new RecommendedPlugins(); + add_action( 'admin_menu', [ $this, 'admin_menus' ] ); add_action( 'admin_init', [ $this, 'setup_wizard' ], 99 ); @@ -699,9 +710,7 @@ public function dokan_setup_recommended() {