Skip to content

Commit

Permalink
Social | Change My Jetpack CTA for Social from "Learn more" to "Activ…
Browse files Browse the repository at this point in the history
…ate" (#40359)
  • Loading branch information
manzoorwanijk authored Nov 27, 2024
1 parent f9a3dc7 commit 59c4cde
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate"
19 changes: 18 additions & 1 deletion projects/packages/my-jetpack/src/products/class-social.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
*
Expand All @@ -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' );
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate"
4 changes: 4 additions & 0 deletions projects/plugins/boost/changelog/update-my-jetpack-social-cta
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: enhancement

Social | Improved My Jetpack CTA for Social Activate the module instead of Learn More
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Social | Changed My Jetpack CTA for Social from "Learn more" to "Activate"

0 comments on commit 59c4cde

Please sign in to comment.