-
Notifications
You must be signed in to change notification settings - Fork 210
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
Adding admin notices for detached subscriptions #3863
Conversation
@@ -58,6 +65,11 @@ public function admin_notices() { | |||
// All other payment methods. | |||
$this->payment_methods_check_environment(); | |||
|
|||
// Subscription related checks. | |||
if ( class_exists( 'WC_Subscriptions' ) && class_exists( 'WC_Subscription' ) && version_compare( WC_Subscriptions::$version, '2.2.0', '>=' ) ) { |
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 have moved a helper method with this check here so we can use it in non-gateway classes.
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.
Thanks for fixing this so quickly @wjrosa 👏🏼
The code looks good, and it tests well 🚢
See: p1739145321956079-slack-C7U3Y3VMY
Changes proposed in this Pull Request:
This PR adds new admin notices to alert merchants when subscriptions payment methods are detached, preventing renewals from happening. This should help them be more proactive in identifying and fixing this kind of issue.
Testing instructions
add/admin-notices-for-detached-subscriptions
)(you can also just set
$payment_method->customer
tonull
in thesubscriptions_check_environment
method)changelog.txt
andreadme.txt
(or does not apply)Post merge