From d6ae3e226777fcb08ef7863c76593db9624774a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Blanco?= Date: Tue, 29 Oct 2024 16:32:07 -0300 Subject: [PATCH] Post migration experience: Hide ssl task on wpcomstaging.com (#39953) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Post-migration: hide ssl task on wpcomstaging.com * changelog --------- Co-authored-by: Andrés Blanco --- .../jetpack-mu-wpcom/changelog/fix-hide-ssl-task | 5 +++++ .../features/launchpad/launchpad-task-definitions.php | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/fix-hide-ssl-task diff --git a/projects/packages/jetpack-mu-wpcom/changelog/fix-hide-ssl-task b/projects/packages/jetpack-mu-wpcom/changelog/fix-hide-ssl-task new file mode 100644 index 0000000000000..f289c92069ca8 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/fix-hide-ssl-task @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Small detail on WPCOM list + + diff --git a/projects/packages/jetpack-mu-wpcom/src/features/launchpad/launchpad-task-definitions.php b/projects/packages/jetpack-mu-wpcom/src/features/launchpad/launchpad-task-definitions.php index 2d870ff8b8766..c6fc9808339bf 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/launchpad/launchpad-task-definitions.php +++ b/projects/packages/jetpack-mu-wpcom/src/features/launchpad/launchpad-task-definitions.php @@ -857,7 +857,7 @@ function wpcom_launchpad_get_task_definitions() { return __( 'Provision SSL certificate', 'jetpack-mu-wpcom' ); }, 'is_complete_callback' => 'wpcom_launchpad_is_task_option_completed', - 'is_disabled_callback' => 'wpcom_launchpad_is_primary_domain_wpcom', + 'is_visible_callback' => 'wpcom_launchpad_is_ssl_task_visible', 'get_calypso_path' => function ( $task, $default, $data ) { $domain = $data['site_slug_encoded']; return '/domains/manage/' . $domain . '/edit/' . $domain; @@ -2815,6 +2815,15 @@ function wpcom_launchpad_get_latest_draft_id() { return $cached_draft_id; } +/** + * Will return true if the primary domain is not a WPCOM domain. + * + * @return bool + */ +function wpcom_launchpad_is_ssl_task_visible() { + return ! wpcom_launchpad_is_primary_domain_wpcom(); +} + /** * Checks if the current site primary domain is a WPCOM domain. *