Allow Modification of Feed Attributes in EVENT_BEFORE_PROCESS_FEED #1582
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.
Description
Currently, it's not possible to modify the feed attributes in the
beforeProcessFeed
function. While there is an event triggeredEVENT_BEFORE_PROCESS_FEED
, it doesn't allow editing of the feed attributes. For my use case, I need the ability to change theexistingElements
that are later deleted or disabled.To address this, I’ve introduced a breaking change: the feed now returns an array instead of a
FeedModel
. This aligns with the pattern used by other events, which also return an array of feed attributes. Additionally, I've added an element key to simplify access to the feed element type you're currently working with.Please let me know if any adjustments are needed, and I’d appreciate any feedback to help get this merged.
Related issues
#1577