From 67e62536266a03e6b151e89c3eab754fd24aa5ff Mon Sep 17 00:00:00 2001 From: Nico Mollet Date: Thu, 7 Nov 2024 14:02:19 +0100 Subject: [PATCH 1/2] Displays the new licence->name instead of license_account matching licence (Closes #7096) --- inc/functions/admin.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/functions/admin.php b/inc/functions/admin.php index 2971129ffd..2ad6ff113a 100755 --- a/inc/functions/admin.php +++ b/inc/functions/admin.php @@ -550,6 +550,12 @@ function rocket_get_license_type( $customer_data ) { return __( 'Unavailable', 'rocket' ); } + // The licence name directly from User endpoint. + if ( ! empty ( $customer_data->licence->name ) ) { + return esc_html( $customer_data->licence->name ); + } + + // Fallback to licence account. if ( 1 <= $customer_data->licence_account && $customer_data->licence_account < 3 From 709a11714d83fcd4aa5318c16fd841486d77fc40 Mon Sep 17 00:00:00 2001 From: Nico Mollet Date: Thu, 7 Nov 2024 15:07:04 +0100 Subject: [PATCH 2/2] PHPCS --- inc/functions/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/functions/admin.php b/inc/functions/admin.php index 2ad6ff113a..49a8d1449d 100755 --- a/inc/functions/admin.php +++ b/inc/functions/admin.php @@ -551,7 +551,7 @@ function rocket_get_license_type( $customer_data ) { } // The licence name directly from User endpoint. - if ( ! empty ( $customer_data->licence->name ) ) { + if ( ! empty( $customer_data->licence->name ) ) { return esc_html( $customer_data->licence->name ); }