Skip to content

Instantly share code, notes, and snippets.

@cliffordp cliffordp/functions.php
Last active Mar 30, 2018

Embed
What would you like to do?
The Events Calendar: Event Aggregator: Never import any Venues.
<?php
/**
* The Events Calendar: Event Aggregator: Never import any Venues.
*
* @see Tribe__Events__Aggregator__Record__Abstract::insert_posts()
*
* @link https://gist.github.com/cliffordp/f2045efa4b19b39d1b52db5d072b85a7
*/
function cliff_ea_do_not_import_venues( $items, $meta ) {
foreach ( $items as $item ) {
if ( ! empty( $item->venue ) ) {
unset( $item->venue );
}
}
return $items;
}
add_filter( 'tribe_aggregator_before_insert_posts', 'cliff_ea_do_not_import_venues', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.