From 59c4cdec5616084258238fb21eba0f2452bd7c56 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 27 Nov 2024 01:06:11 -0800 Subject: [PATCH] Social | Change My Jetpack CTA for Social from "Learn more" to "Activate" (#40359) --- .../changelog/update-my-jetpack-social-cta | 4 ++++ .../my-jetpack/src/products/class-social.php | 19 ++++++++++++++++++- .../changelog/update-my-jetpack-social-cta | 4 ++++ .../changelog/update-my-jetpack-social-cta | 4 ++++ .../changelog/update-my-jetpack-social-cta | 4 ++++ .../changelog/update-my-jetpack-social-cta | 4 ++++ .../changelog/update-my-jetpack-social-cta | 4 ++++ .../changelog/update-my-jetpack-social-cta | 4 ++++ .../changelog/update-my-jetpack-social-cta | 4 ++++ .../changelog/update-my-jetpack-social-cta | 4 ++++ 10 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 projects/packages/my-jetpack/changelog/update-my-jetpack-social-cta create mode 100644 projects/plugins/backup/changelog/update-my-jetpack-social-cta create mode 100644 projects/plugins/boost/changelog/update-my-jetpack-social-cta create mode 100644 projects/plugins/jetpack/changelog/update-my-jetpack-social-cta create mode 100644 projects/plugins/protect/changelog/update-my-jetpack-social-cta create mode 100644 projects/plugins/search/changelog/update-my-jetpack-social-cta create mode 100644 projects/plugins/social/changelog/update-my-jetpack-social-cta create mode 100644 projects/plugins/starter-plugin/changelog/update-my-jetpack-social-cta create mode 100644 projects/plugins/videopress/changelog/update-my-jetpack-social-cta diff --git a/projects/packages/my-jetpack/changelog/update-my-jetpack-social-cta b/projects/packages/my-jetpack/changelog/update-my-jetpack-social-cta new file mode 100644 index 0000000000000..6b1daf9c1b05e --- /dev/null +++ b/projects/packages/my-jetpack/changelog/update-my-jetpack-social-cta @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate" diff --git a/projects/packages/my-jetpack/src/products/class-social.php b/projects/packages/my-jetpack/src/products/class-social.php index ae61dc9b17386..fb7cd2dd42575 100644 --- a/projects/packages/my-jetpack/src/products/class-social.php +++ b/projects/packages/my-jetpack/src/products/class-social.php @@ -8,6 +8,7 @@ namespace Automattic\Jetpack\My_Jetpack\Products; use Automattic\Jetpack\My_Jetpack\Hybrid_Product; +use Automattic\Jetpack\My_Jetpack\Products; use Automattic\Jetpack\My_Jetpack\Wpcom_Products; use Automattic\Jetpack\Status\Host; @@ -144,6 +145,22 @@ public static function get_wpcom_product_slug() { return 'jetpack_social_v1_yearly'; } + /** + * Gets the 'status' of the Social product + * + * @return string + */ + public static function get_status() { + $status = parent::get_status(); + if ( Products::STATUS_NEEDS_PLAN === $status ) { + // If the status says that the site needs a plan, + // My Jetpack shows "Learn more" CTA, + // We want to instead show the "Activate" CTA. + $status = Products::STATUS_NEEDS_ACTIVATION; + } + return $status; + } + /** * Checks whether the current plan (or purchases) of the site already supports the product * @@ -159,7 +176,7 @@ public static function has_paid_plan_for_product() { 'jetpack_growth', ); // For atomic sites, do a feature check to see if the republicize feature is available - // This feature is available by default on all Jetpack sites + // This feature is available by default on all Jetpack sites. if ( ( new Host() )->is_woa_site() ) { return static::does_site_have_feature( 'republicize' ); } diff --git a/projects/plugins/backup/changelog/update-my-jetpack-social-cta b/projects/plugins/backup/changelog/update-my-jetpack-social-cta new file mode 100644 index 0000000000000..6b1daf9c1b05e --- /dev/null +++ b/projects/plugins/backup/changelog/update-my-jetpack-social-cta @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate" diff --git a/projects/plugins/boost/changelog/update-my-jetpack-social-cta b/projects/plugins/boost/changelog/update-my-jetpack-social-cta new file mode 100644 index 0000000000000..6b1daf9c1b05e --- /dev/null +++ b/projects/plugins/boost/changelog/update-my-jetpack-social-cta @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate" diff --git a/projects/plugins/jetpack/changelog/update-my-jetpack-social-cta b/projects/plugins/jetpack/changelog/update-my-jetpack-social-cta new file mode 100644 index 0000000000000..c79f38d85e467 --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-my-jetpack-social-cta @@ -0,0 +1,4 @@ +Significance: patch +Type: enhancement + +Social | Improved My Jetpack CTA for Social Activate the module instead of Learn More diff --git a/projects/plugins/protect/changelog/update-my-jetpack-social-cta b/projects/plugins/protect/changelog/update-my-jetpack-social-cta new file mode 100644 index 0000000000000..6b1daf9c1b05e --- /dev/null +++ b/projects/plugins/protect/changelog/update-my-jetpack-social-cta @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate" diff --git a/projects/plugins/search/changelog/update-my-jetpack-social-cta b/projects/plugins/search/changelog/update-my-jetpack-social-cta new file mode 100644 index 0000000000000..6b1daf9c1b05e --- /dev/null +++ b/projects/plugins/search/changelog/update-my-jetpack-social-cta @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate" diff --git a/projects/plugins/social/changelog/update-my-jetpack-social-cta b/projects/plugins/social/changelog/update-my-jetpack-social-cta new file mode 100644 index 0000000000000..6b1daf9c1b05e --- /dev/null +++ b/projects/plugins/social/changelog/update-my-jetpack-social-cta @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate" diff --git a/projects/plugins/starter-plugin/changelog/update-my-jetpack-social-cta b/projects/plugins/starter-plugin/changelog/update-my-jetpack-social-cta new file mode 100644 index 0000000000000..6b1daf9c1b05e --- /dev/null +++ b/projects/plugins/starter-plugin/changelog/update-my-jetpack-social-cta @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate" diff --git a/projects/plugins/videopress/changelog/update-my-jetpack-social-cta b/projects/plugins/videopress/changelog/update-my-jetpack-social-cta new file mode 100644 index 0000000000000..6b1daf9c1b05e --- /dev/null +++ b/projects/plugins/videopress/changelog/update-my-jetpack-social-cta @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate"