Skip to content

Instantly share code, notes, and snippets.

@jazbek
Created May 22, 2014 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jazbek/ed37b78ec720bdea1e0f to your computer and use it in GitHub Desktop.
Save jazbek/ed37b78ec720bdea1e0f to your computer and use it in GitHub Desktop.
Don't update the event description at eventbrite
<?php
add_filter('tribe_events_eb_request', 'tribe_dont_send_eb_description', 10, 3);
function tribe_dont_send_eb_description( $request, $action, $params ){
// check if we're sending an event update
if ( $action == 'event_update' ) {
// parse the event data into an array
$event_info = array();
parse_str( $params, $event_info );
// unset the event description
unset( $event_info['description'] );
// put the new description-less event data back into a string
$new_params = _http_build_query( $event_info );
// replace the original event info with the new one before the request is sent to EB
$request = str_replace( $params, $new_params, $request );
}
return $request;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment