From 95e2d84fd3e396d1f71f2e80703a6b99915a2d91 Mon Sep 17 00:00:00 2001 From: Ramya krishna Date: Mon, 7 Oct 2024 19:18:02 +0530 Subject: [PATCH] don't show my plugins & tools if the entitkements are empty --- includes/Solutions.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/Solutions.php b/includes/Solutions.php index 9bc8657..5ce58a5 100644 --- a/includes/Solutions.php +++ b/includes/Solutions.php @@ -94,13 +94,12 @@ public function init_entitilements_apis(): void { * @return array */ public static function add_my_plugins_and_tools_tab( array $tabs ) { - // $hiive = new HiiveConnection(); - // $api = new EntitlementsApi( $hiive ); - // $entitlements = $api->get_items(); - // if ( $entitlements->data->entitlements ) { + $hiive = new HiiveConnection(); + $api = new EntitlementsApi( $hiive ); + $entitlements = $api->get_items(); + if ( $entitlements->data->entitlements ) { $tabs['nfd_my_plugins_and_tools'] = __( 'My Plugins & Tools', 'wp-module-solutions' ); - - // } + } return $tabs; }