Skip to content

Add event description meta and update existing filter to allow for more flexible meta creation#9

Merged
scottf-tvw merged 2 commits intoTVWIT:mainfrom
sdunham:feature/event-description
Mar 14, 2025
Merged

Add event description meta and update existing filter to allow for more flexible meta creation#9
scottf-tvw merged 2 commits intoTVWIT:mainfrom
sdunham:feature/event-description

Conversation

@sdunham
Copy link
Contributor

@sdunham sdunham commented Mar 13, 2025

This PR makes two small updates:

  1. It adds an invintus_event_description meta key to the default list of meta created for Invintus events imported via webhooks.
  2. It adds the raw webhook event data array as an additional argument to the existing invintus/data/prepare filter

The intention behind the second update is to provide a more flexible method for developers to add additional meta fields derived from Invintus webhook data using meta_input argument. A hypothetical example:

// This would add my target key from the Invintus event data to the post meta
add_filter( 'invintus/data/prepare', function( $data, $event ){
    if (isset($event['some_invintus_key'])) {
        $data['meta_input'] = [
            'some_invintus_key' => $event['some_invintus_key']
        ];

    }
    
    return $data;
} , 10, 2 );

@scottf-tvw scottf-tvw merged commit 826887b into TVWIT:main Mar 14, 2025
scottf-tvw added a commit that referenced this pull request Mar 14, 2025
release with PR #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants