Hi Stephen,
When I updated Event Organiser to version 2.7.5, I received the following error: Fatal error: Call to undefined function eventorganiser_is_event_query().
I had used this function in some code you gave me a few months ago that let me group events in a certain way:
add_action( ‘pre_get_posts’, ‘shahn1234_group_occurrences’ );
function shahn1234_group_occurrences( $query ){
if( eventorganiser_is_event_query( $query )
&& $query->is_main_query()
&& is_tax( ‘event-tag’ ) ){
$query->set( 'group_events_by', 'series' );
$query->set( 'event_start_after', 'now' );
}
}
Is there an updated version of eventorganiser_is_event_query()?
Thanks,
Suzanne

Ronya Banks
Hi Ronya,
When a plug-in is updated, it deactivates the plug-in. This means any included functions are not defined (hence the error!). I’ll keep this in mind in future posts, (if you can remember where you got that code, I’ll update it to), but a very easy way to fix the issue is to do the following:
if( defined( 'EVENT_ORGANISER_DIR' ) && eventorganiser_is_event_query( $query )
...
(That is, adding a defined( 'EVENT_ORGANISER_DIR' )
conditional).
(This isn’t strictly speaking necessary, it depends on what other plug-ins/themes. In your case it seems that a plug-in/theme is causing the filter pre_get_posts
to be triggered during the update routine.)
Additionally the fatal error will probably have prevented Event Organiser from being re-activated. If you haven’t already, you should activate Event Organiser. This will “fix” the error, but it’ll reoccur when you update it again, unless you use the above code.

Stephen Harris
Thanks so much, Stephen! That did the trick. 🙂
I originally got that code from you over at the WordPress support page for your plugin:
http://wordpress.org/support/topic/sort-order-for-taxonomy-event-tagphp

Ronya Banks
Great, thanks! I’ve just posted an update on that thread so others don’t get caught out.

Stephen Harris