-
Notifications
You must be signed in to change notification settings - Fork 191
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
Fix: prevent Stripe Payment Element from rendering when amount is zero #7515
Open
jonwaldstein
wants to merge
2
commits into
develop
Choose a base branch
from
fix/GIVE-509
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@jonwaldstein Should this be resolved upstream? Might this affect other gateways as well?
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.
It's a good question and something I have considered and even spiked
However, In order to accomplish this upstream the options I see are:
These options further solidify our rejection of $0 donations which we're still working out in our product. So at this point, I think it's okay for the gateways to handle this themselves (which most are doing) - at least until we come to a solid conclusion and direction for our product around the subject.
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'm not sure if this helps, but I know that we're planning at some point to allow $0 donations for things like events. I think, at that time, we're actually more likely to do something like hide the gateways (similar to WooCommerce). In the meantime, I think we can simply enforce the current assumption that donations must be at least $1 — or whatever the actual minimum donation value is.
I think it's fine to go this route for now, knowing we may change it later.
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.
Yeah hiding the gateways was an option on my $0 spike. That was something I built for the marketing team to allow $0 donations. I'd like to pull out some of what I did over there for core.
I do also like the idea of using the minimum amount value too 🤔
However, the scope of this PR is so small and would solve the immediate weirdness.
I'd be happy to open a separate one that ports over the gateway filtering to play around with all gateways which of course will increase the scope.
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.
Started scaffolding the other PR #7599
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.
Up to you whether you want to merge this PR to fix the immediate issue and proceed or not. This would ultimately become a tiny amount of technical debt.