[REF] Extract code to get the from address for a recurring contribution. #21357
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.
Overview
[REF] Extract code to get the from address for a recurring contribution.
Before
Long code block
After
spiffing new function
Technical Details
This makes the retrieval generally available, since is it part of the data model,
rather than tied to the form. It could possibly be a token, or at least retrievable on
the recurring edit workflow template - but that is beyond the scope of this
Note that in some cases this could result in an extra query but in others it might make the query quicker. I don't think an extra query in a form post process is a biggie (deep in the BAO it could be)
This parameter is specifically covered in the test I pre-added but I updated the test so that it was using the more 'complicted' variant - ie retrieving from a contribution page
Comments
@seamuslee001 are you able to MOP this - I think it's pretty straight forward & will make code conversations easier if we get rid of this noise