Automattic / Automattic/jetpack

Stats: upgrade nudges not validating active products

Open
#34,077 2 comments 0 reactions 0 assignees View on GitHub
[Feature] Stats Data [Plugin] Jetpack [Pri] Low Admin Page Bug Plans
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

Jetpack Stats contains an upgrade block that shows products people might be interested in that don't yet have.

However, based on my testing the checks in place don't seem to be working. Notice how, for example, VideoPress is active on the site and yet the upgrade nudge still shows:

![image](https://github.com/Automattic/jetpack/assets/390760/36d80639-a356-4c96-a79a-7e36bac234a1)

In this particular site I have the Complete plan which includes VideoPress. The `has_product` code seems to be doing per-product validation rather than a global check; [see the code](https://github.com/Automattic/jetpack/blob/58474d832dbfd47cb345623b53cadd588b4e6775/projects/plugins/jetpack/modules/stats/class-jetpack-stats-upgrade-nudges.php#L576C1-L576C1).

Contributor guide

Open the contributing guide

Research direction

Read projects/plugins/jetpack/modules/stats/class-jetpack-stats-upgrade-nudges.php at the has_product code near line 576. Reproduce the case shown in the issue with an active product included in the site's plan, then trace how the upgrade block validates products. Done means active products such as VideoPress no longer appear as upgrade nudges.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.