Event Organiser Pro 1.5

Just in time for WordPress 3.8, I’m pleased to announce Event Organiser Pro 1.5. This update brings a lot of the features that have been requested by you. Most of these changes are ‘out of sight’ (unless required), and so Event Organiser retains it’s simple to use user-interface.

Here’s a brief summary of what you can expect:

WordPress 3.8 compatible

This version (along with Event Organiser 2.6 released yesterday) has not just been tested with WordPress 3.8 release candidate, but some UI tweaks mean that Event Organiser will fit as seamlessly into your new-look WordPress admin as it did in previous versions. But don’t worry about updating while you are still running older versions of WordPress: these UI changes only come into effect if you’re running WordPress 3.8 or have the MP6 plug-in installed:

Event Organiser admin calendar in WordPress 3.8

Event Organiser admin calendar in WordPress 3.8. Please note that some WordPress 3.8 related UI updates were included in Event Organiser 2.6.

New ticket manager

The “ticket manager” user interface (formally a modal pop-up) as been completely rebuilt to provide something a bit more user friendly. This was for several reasons: modals are, generally speaking, not great. This is particular so when considering that the existing solution could feel rather cramped. Finally, WordPress is getting a brand new look in 3.8, so it seemed fitting to give the ticket manager a new look too – something which would fit in with it (don’t worry, it still looks good under previous versions of WordPress).

Ticket options

Ticket options when selling tickets by date

The change also gave the plug-in more room, so the following could be added:

Specify time tickets are on sale

You’ve also been able to specify the dates on which a ticket came on and off sale (with the tickets being automatically taken down when the event starts), but now you can specify a time too.

Order tickets

You can now order specify the order in which tickets appear on the booking form. Hovering over the ticket’s row on the event admin page reveals your( edit or delete the ticket, or move it up/down).

Additional e-mail template tags:

As requested, the following e-mail template tags

  • form_submission (Displays a table of data collected from custom booking fields)
  • event_venue (Venue name)
  • event_venue_address
  • event_venue_city
  • event_venue_state
  • event_venue_postcode
  • event_venue_country
  • event_venue_url
  • event_url

Multi-user booking management

Previously only admins could view and manage bookings. This update adds two capabilities:

  • Manage bookings – the a ability to manage bookings for the user’s event
  • Manage other events’ bookings – Ability to manage bookings for other users’ events

So now an event’s organiser can manage bookings for that event. Admins will be automatically given both permissions when the plug-in updates, so you won’t need to do anything unless you want your non-admin event organisers to manage events.

To change these settings go to Settings > Event Organiser > Permissions.

Filter gateways by booking form / event

While there is no UI for this you can now filter the gateways that appear on the booking form by event, via the eventorganiser_booking_form_gateways filter.

There’ll be a tutorial following shortly on using this filter.

Change booking notification email

Again, there is no UI for this (but stay tuned for extensions which take advantage of it), but notification emails are now filtered. There are two filters,

The site’s admin email, by default the same e-mail set in Settings > General, is now filtered with eventorganiser_admin_email:

add_filter( 'eventorganiser_admin_email', 'my_event_admin_email' );
function my_event_admin_email( $email ){
      //Change $email;
      return $email;        
}

The admin email is only used for booking notifications currently – however if you only want to change the email for booking notifications (and particularly if you want to set the notification email differently for each booking or event):

add_filter( 'eventorganiser_booking_notification_email', 'my_booking_notification_email', 10, 2 );
function my_booking_notification_email( $emails, $booking_id ){
      //Change $email;
      return $emails;        
}

Important: $emails is an array of emails (by default containing just the one email – the site admin), as opposed to a string filtered by eventorganiser_admin_email. This allows you to send booking notifications to multiple email addresses.

As an example, this snippet sends booking notifications to the event organiser and site admin

add_filter( 'eventorganiser_booking_notification_email' 'my_booking_notification_email', 10, 2 );
function my_booking_notification_email( $emails, $booking_id ){

      //Get the event ID and organiser ID
      $event_id = eo_get_booking_meta( $booking_id, 'event_id' );

      //Get the event's organiser
      $organiser_id = get_post_field( 'post_author' $event_id );
      $user_obj = get_userdata( $organiser_id );

      //If the user exists, add their email to notify both organiser and admin
      if( $user_obj ){
          $emails[] = $user_obj->user_email;
      }

      return $emails;        
}

API changes

Ordering events by distance: When querying events by proximity to a given location you can now set orderby to distance to order events by their distance to that location. If you’ve got recurring events, it would probably make sense to set group_events_by to series too.

Ordering venues randomly or by meta value: Three new options for orderby have been added when querying events. rand – which returns venues in an random order and meta_value and meta_value_num, both of which must be used in conjunction with a venue_query and order the venues by the first query component.

In this example we retrieve all venues in Edinburgh city, and sort them by the number of parking spaces:

$venues = eo_get_venues( array( 
    'meta_query' => array(
        array(
            'key' => '_parking_spaces',
            'compare' => 'EXISTS'.
            'value' => '-', //Ignored, but must provide non-empty string, see http://core.trac.wordpress.org/ticket/23268
        ),
        array(
            'key' => '_city',
            'value' => 'Edinburgh',
        )
     ),
    'orderby' => 'meta_value_num', //orders by parking spaces 
));

Please note meta_value sorts values as a string, whereas meta_value_num sorts values by numerical value.