Skip to content

Commit

Permalink
When checking for expiring products, dont check Features classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottprogrammer committed Dec 19, 2024
1 parent e6e08a0 commit c25d0e9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions projects/packages/my-jetpack/src/class-initializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -984,14 +984,22 @@ public static function alert_if_paid_plan_expiring( array $red_bubble_slugs ) {
if ( ! $connection->is_connected() ) {
return $red_bubble_slugs;
}
$product_classes = Products::get_products_classes();
$product_classes = Products::get_products_classes();
$not_shown_products = array(
'scan',
'extras',
'ai',
'newsletter',
'site-accelerator',
'related-posts',
);

$products_included_in_expiring_plan = array();
foreach ( $product_classes as $key => $product ) {
// Skip these- we don't show them in My Jetpack.
// ('ai' is a duplicate class of 'jetpack-ai', and therefore not needed).
// See `get_product_classes() in projects/packages/my-jetpack/src/class-products.php for more info.
if ( 'scan' === $key || 'extras' === $key || 'ai' === $key ) {
if ( in_array( $key, $not_shown_products, true ) ) {
continue;
}

Expand Down

0 comments on commit c25d0e9

Please sign in to comment.