Open kangzj opened 1 year ago
We might want to leverage the plan checks:
If we are going down that road, I guess it would require both Jetpack and Calypso changes - not really a problem tho.
Thanks for picking this one up @a8ck3n !
Updated the tasks for this Issue. My initial understanding was it should not be shown for Complete bundles. Reviewing the Security bundle, I think it makes sense to filter the listing (remove security & backup) but still show it on those sites.
For the usePurchasedProducts
hook, see comments here:
https://github.com/Automattic/wp-calypso/pull/93318#pullrequestreview-2228551161
A couple notes on possible refactorings:
usePurchaseProducts
hook uses an API call that returns incomplete plan data. It doesn't know about Business or Complete plans. If we update it to call getSitePurchases
it should get the full set of plan/purchase data.
For example if a site has Complete plan, the Search, Backup etc should NOT be shown in the upsell section.