New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show notice for expired and expiring subscriptions in settings and in-app extensions page #47004
base: trunk
Are you sure you want to change the base?
Conversation
Hi @gedex, @hesahesa, @adrianduffell, @mehamasum, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
be8f6dc
to
d56a010
Compare
d56a010
to
d5864be
Compare
d533b14
to
6c6a1cb
Compare
2394111
to
00c4a3c
Compare
not showing expiring subs notice if expired sub notice render
00c4a3c
to
a2324fe
Compare
f56b72b
to
3e9a875
Compare
d39e32f
to
88b5db9
Compare
public static function woo_subscriptions_notice_dismiss_api() { | ||
register_rest_route( | ||
'wc-admin', | ||
'/woo_subscription_notice_dissmiss', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest making the endpoint path to be more general (because the endpoint is used to mark whether a notice is dismissed or not)
The notice type to be dismissed is already contained in the parameter, right?
* Register the routes for dismissal subscriptions notice. | ||
*/ | ||
public static function woo_subscriptions_notice_dismiss_api() { | ||
register_rest_route( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about putting the rest route API registration in the plugins/woocommerce/src/Admin/API
instead? because it seems like it is more suitable place there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I will move this endpoint to Admin/API section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed e5f740a
Just a heads up that Desire also has changes pending to the |
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. Test this pull request with WordPress Playground. Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit. |
Thanks for the heads up, @KokkieH . I've updated the component logic to ensure that notices are hidden from the new Business Services tab. |
…com/woocommerce/woocommerce into add-woo-admin-notice-for-expire-sub
Despite of the issue of all connected stores get the same notice, here's my tests based on PR's instruction:
|
return array(); | ||
} | ||
|
||
$subscriptions = WC_Helper::get_subscriptions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that this gets connected user's subscriptions (does not consider the site it's connected from)
return array(); | ||
} | ||
|
||
$subscriptions = WC_Helper::get_subscriptions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that this gets connected user's subscriptions (does not consider the site it's connected from)
Submission Review Guidelines:
Show notice on the WC settings page and marketplace page about expired and expiring subscriptions
Notices we want to show:
Changes proposed in this Pull Request:
Note about notices:
Messages we want to show:
Your subscription for [product name] expired. Renew for [price] to continue receiving updates and streamlined support.
One of your subscriptions for [product name] has expired. Renew for [price] to continue receiving updates and streamlined support.
You have X Woo extension subscriptions that expired. Renew to continue receiving updates and streamlined support.
Your subscription for [product name] expires on [date]. Enable auto-renewal to continue receiving updates and streamlined support.
One of your subscriptions for [product name] expires on [date]. Enable auto-renewal to continue receiving updates and streamlined support.
:You have X Woo extension subscriptions expiring soon. Enable auto-renewal to continue receiving updates and streamlined support.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
cd plugins/woocommerce
thennvm use && pnpm run build --filter=woocommerce
.Changelog entry
Significance
Type
Message
Comment