Remove unreachable customGroup section in online event receipt #19069
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
Remove unreachable customGroup section in online event receipt
Before
Section for including custom fields when assigned as $customGroup - but I can find no evidence nor think of a reason why it would be assigned.
After
The section is removed from the template - meaning it would not be present on new installs
Technical Details
After digging into #18697 I came to the
conclusion that currently both the online & offline event receipts have
sections for custom profiles and custom data (marked as customGroup).
The profiles are only assigned from the online flow and the data only from the offline
flow so in each receipt template one is unused.
I agree with the discussion on https://lab.civicrm.org/dev/core/-/issues/2076
that suggests that since every event has (potentially) assigned profiles
we could use those in both scenarios and never use the generic 'customGroup'.
The situation is less clear for contributions (where there is no profile
if there is no contribution page). Thus, I am inclined
to remove customGroup from the offline template too, after fixing to
include the profiles. However, there are additional
steps to get to the point where that is doable - at this stage I think
we CAN remove it from the online template because I cannot find anywhere
in the code where customGroup is assigned in that flow, nor logically
think of any reason other than copy and paste for it
Comments