Ensure we don't get previously set honoree values in receipts #21483
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
When processing a series of recurring contributions, the honoree info from previously processed contributions show up in the receipts of contributions processed later.
@adixon @KarinG - We encountered this bug with a group using Iats - and it may impact Iats more then other payment processors because Iats processes recurring contributions in single run rather then via individual webhook calls.
Before
When running a series of recurring contributions, if a contribution includes an honoree (soft credit), then that honoree will show up in all subsequent receipts that do not specify an honoree.
Here's what the first (correct) receipt looks like:
And a later (incorrect) receipt might look like this:
After
By manualling clearing the variable, the incrrect data does not show up.
Technical Details
This behavior and fix are tested against 5.39. I'm sure I should submit a test to lock it in, but am a bit overwhelmed by all the moving parts of setting up the recurring contribution, checking the email etc.