Commit d1a73a0
Stats: hide Jetpack upsells for products the site already owns
The Odyssey Stats upsell section showed a product whenever the site was
missing any one of the product's feature slugs, so a site on Jetpack
Security (which bundles VaultPress Backup) was still prompted to buy
Backup, and only checkout revealed the product was already included.
Invert the check: each upsell now lists the entitlement features that
mean the product is owned, and the card is hidden when the site has all
of them.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 9074d8c commit d1a73a0
3 files changed
Lines changed: 75 additions & 43 deletions
File tree
- client/my-sites/stats/jetpack-upsell-section
- test
- upsell-card
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
Lines changed: 52 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
Lines changed: 19 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 42 | + | |
60 | 43 | | |
61 | 44 | | |
62 | 45 | | |
| |||
68 | 51 | | |
69 | 52 | | |
70 | 53 | | |
71 | | - | |
| 54 | + | |
72 | 55 | | |
73 | 56 | | |
74 | 57 | | |
| |||
80 | 63 | | |
81 | 64 | | |
82 | 65 | | |
83 | | - | |
| 66 | + | |
84 | 67 | | |
85 | 68 | | |
86 | 69 | | |
| |||
92 | 75 | | |
93 | 76 | | |
94 | 77 | | |
95 | | - | |
| 78 | + | |
96 | 79 | | |
97 | 80 | | |
98 | 81 | | |
| |||
104 | 87 | | |
105 | 88 | | |
106 | 89 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 90 | + | |
115 | 91 | | |
116 | 92 | | |
117 | 93 | | |
| |||
123 | 99 | | |
124 | 100 | | |
125 | 101 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 102 | + | |
131 | 103 | | |
132 | 104 | | |
133 | 105 | | |
| |||
137 | 109 | | |
138 | 110 | | |
139 | 111 | | |
140 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
141 | 122 | | |
0 commit comments