-
-
Notifications
You must be signed in to change notification settings - Fork 828
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
CRM-18397: Don't add empty billing name to non-existent billing address #8122
Conversation
JKingsnorth
commented
Apr 12, 2016
- CRM-18397: Blank billing address created on paid event registrations with no billing address
@JKingsnorth can I close this in favor of #8176 ? |
Well at the moment this solution is more functional than the other. It depends if the QAers want to refine the other PR or if they have any comments for me to improve on this one. |
Sorry for delay, seems like rohan has already made some changes in his PR #8176 on some of the flaw you mentioned in the ticket itself. |
Accepting this makes me die a little inside. I would so much prefer to consolidate with $this->formatParamsForPaymentProcessor($fields); (used by the contribute form) And to resolve all those questions on why we add & drop billing filling fields like they are participants in a boy band. However, I realise I'm not game to turn this into the PR I really want to do this time around - not least because we don't have CI tests on event forms yet. So, perhaps as a compromise we could just brutalise the code with comments. |
@@ -1052,6 +1052,9 @@ public static function fixLocationFields(&$params, &$fields, &$form) { | |||
} |
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.
This function is largely a duplicate of the contribution function
$fields = $this->formatParamsForPaymentProcessor($fields);
However, there is a possible case where the syntax might diverge when dealing with multiple participants.
In general the contribution code is cleaner because rather than coming up with 100 & one conditions as to why we add or remove the billing fields it simply assumes that if we presented them on the form in the first place then we probably did so in order to save them
Merged! Your comments are so polite too... |