Created
June 16, 2023 15:19
-
-
Save alanef/f446e93d26f6c49c1210971fb49d4d88 to your computer and use it in GitHub Desktop.
Remove an organizer from Display Eventbrite data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'wfea_api_results', function ( $events ) { | |
| // remove a specific organiser id | |
| $organiser_id = 123456789; | |
| $events = array_filter( $events, function ( $event ) use ( $organiser_id ) { | |
| return $event->organizer->id != $organiser_id; | |
| } ); | |
| return $events; | |
| }, | |
| // set to high priority to ensure this filter runs after the default filter in QEM | |
| 1000, | |
| 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment