Changes proposed in this Pull Request
Following up on #42076, which introduced a new feature (behind a feature flag) to show information on the manage purchase pages about other purchases on the same site in some cases where they are expiring soon, this pull requests adds more comprehensive notifications (including for purchases that are auto-renewing soon also), and ensures that the message always shows pertinent information about the current purchase too, when appropriate.
The basic goal is that when viewing one purchase, users always have a way of getting information about (and taking action on) other purchases on the same site that expire or renew soon.
See also internal discussion here: pbOQVh-bC-p2
The pull request handles many cases (too many to list all here) but here are a few new ones to look at.
Multiple subscriptions on the site are auto-renewing soon:
Multiple subscriptions on the site are expiring soon (this was already there, but this pull request makes a small change to the wording to match the above):
The current subscription is auto-renewing soon, but other subscriptions are expiring soon:
Everything is auto-renewing, but the current subscription’s credit card is expired (since the message refers to multiple subscriptions now, the “Update all” action takes you to https://wordpress.com/me/purchases/add-credit-card for simplicity, to update the credit card for all the subscriptions you own at once):
Since we’re showing messages about other subscriptions everywhere, domain mapping subscriptions need to get these kinds of messages too (for consistency), even though they are included in the site’s plan and therefore don’t normally get messages of their own. Here is an example of what that looks like:
Also for consistency, the above needs to apply even when there aren’t multiple subscriptions on the site expiring/renewing soon (for example, a site that only has a plan and domain mapping):
(Note there is an inconsistency between the above two screenshots where the second one doesn’t have a “Renew” link. But as described in the pull request comments, we won’t be solving that here.)
Testing instructions
Existing functionality:
The most important thing to test is probably to ensure that existing functionality is unchanged for the time being — without the upgrades/upcoming-renewals-notices
flag enabled, there should be no meaningful changes to the Manage Purchase behavior.
The one small exception to that is that I standardized the code that re-styles certain kinds of error messages on these pages as information messages in the case of recently-purchased monthly subscriptions (originally added in #23017) to actually apply to monthly subscriptions only. Without that fix, testing that the red error message appears for expiring subscriptions was a pain — because it meant that you couldn’t just create an annual subscription and then change its expiration date to something soon via the WordPress.com backend (you’d have had to always fake an earlier purchase date too).
New functionality:
There’s a lot to test here, and I haven’t tested all the combinations myself yet (I want to eventually) but to test the basics you might want to set up:
- A WordPress.com site with a plan, domain mapping, a couple domain registrations, a theme, and another purchase.
- A Jetpack site with a plan and an add-on (such as Jetpack Search).
Then, play around with changing their auto-renew settings and expiration dates and make sure the messages you see when viewing each subscription’s Manage Purchase page makes sense, and that the message always gives you a way to quickly view the other upgrades that it is talking about and easily change their status in whatever way you want.
Unfortunately, no screenshots were provided by the developer.