From 94092946a3326e008a3853c98e92c790707d705b Mon Sep 17 00:00:00 2001 From: Gabriel Demichelis Date: Wed, 10 Apr 2024 22:38:26 -0300 Subject: [PATCH] Update/monetize jpcloud launchpad links (#36728) * Monetize: Update launchpad tasks links to JP Cloud * changelog --------- Co-authored-by: okmttdhr --- .../changelog/update-monetize-jpcloud-launchpad-links | 4 ++++ .../src/features/launchpad/launchpad-task-definitions.php | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/update-monetize-jpcloud-launchpad-links diff --git a/projects/packages/jetpack-mu-wpcom/changelog/update-monetize-jpcloud-launchpad-links b/projects/packages/jetpack-mu-wpcom/changelog/update-monetize-jpcloud-launchpad-links new file mode 100644 index 0000000000000..3a6aa240b073b --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/update-monetize-jpcloud-launchpad-links @@ -0,0 +1,4 @@ +Significance: minor +Type: changed + +Update Monetize Launchpad links to Jetpack Cloud 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 4acff4a62b49d..0ac94e3382c41 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 @@ -577,6 +577,9 @@ function wpcom_launchpad_get_task_definitions() { 'earn-launchpad' ); } + if ( wpcom_launchpad_should_use_jetpack_cloud_link() ) { + return 'https://cloud.jetpack.com/monetize/payments/' . $data['site_slug_encoded']; + } return '/earn/payments/' . $data['site_slug_encoded']; }, ), @@ -587,6 +590,9 @@ function wpcom_launchpad_get_task_definitions() { 'is_complete_callback' => 'wpcom_launchpad_has_paid_membership_plans', 'is_visible_callback' => '__return_true', 'get_calypso_path' => function ( $task, $default, $data ) { + if ( wpcom_launchpad_should_use_jetpack_cloud_link() ) { + return 'https://cloud.jetpack.com/monetize/payments/' . $data['site_slug_encoded'] . '#add-new-payment-plan'; + } return '/earn/payments/' . $data['site_slug_encoded'] . '#add-new-payment-plan'; }, ),