-
Notifications
You must be signed in to change notification settings - Fork 206
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
Hide express payment buttons on switch subscription page #3610
base: develop
Are you sure you want to change the base?
Conversation
@@ -85,6 +85,11 @@ public function init() { | |||
return; | |||
} | |||
|
|||
// Don't load for switch subscription page. | |||
if ( isset( $_GET['switch-subscription'] ) ) { | |||
return true; |
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.
Is there a particular reason for the true
value here? I'm just asking because the other return statements above do not have a value (void).
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 catch. I added this check inside another function (which should return a boolean) at first and copied it over from there. It is a copy paste error on my end 🤦♀️
Fixed in 2a0929f
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.
Fixes #3608
Changes proposed in this Pull Request:
As switch subscription page is basically the product page, when paid with ECE/PRB the full amount is charged instead of the difference. We are hiding the PRB/ECE buttons from the switch subscription page.
Testing instructions
WooCommerce Subscription
plugin.develop
branch, you can see the ECE button on this page.