Pro: Allow bookees to see their bookings

WordPress Event Management, Calendars & Registration Forums General Question Pro: Allow bookees to see their bookings

This topic contains 5 replies, has 2 voices, and was last updated by  Stephen Harris 10 years, 11 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5703

    Hi Stephen,

    Could you give me a pointer as to how to allow a user who’s booked one or more events to see the list of events booked, please?

    Thanks!

    John

    s2dd
    #5708

    This is currently earmarked for 1.3 (~June) which will add widget/shortcodes for listing a user’s booking history/ up-coming events they are attending.

    If you wanted to implement something yourself you can use eventorganiser_get_bookings() (docs in source, see includes/bookings directory). Bookee ID is the user ID of the bookee.

    You could use that to create your own shortcode ( http://wp-event-organiser.com/blog/tutorial/creating-your-own-shortcodes/) . To get the logged-in user’s ID: get_current_user_id()

    Stephen Harris
    #5872

    Hi Stephen –

    Thank you for that. I’ve successfully got a list of bookings as an array, using $wp_query = false. However, I’d like to output them as a list of posts (in effect) – so similar to the view of bookings in the admin section.

    I’ve tried coding to use wp_query but without success.

    As you may have guessed I’m somewhat green to WP development. Sadly this can’t wait until June, so I’d be hugely grateful for any pointers you can give me.

    Thanks!

    John

    s2dd
    #5875

    Hi John,

    If it can wait until next week I can email you an alpha-version of what will be included in the next update (in particular the ‘booking history’ shortcode). I think that’s pretty much what you’re after…

    Stephen Harris
    #5905

    Hi Stephen,

    I’ve looked at the updated documentation in the new version of bookings.php and it’s brilliant – I think I should be able to get the results I need, so thank you.

    I’ve got other functionality to build, however, so watch this space…!

    John

    s2dd
    #5909

    I’ve looked at the updated documentation in the new version of bookings.php

    I’ll be publishing the documentation on the site shortly :), but kudos for going straight to source.

    Look out for @access private and @ignore tags – they generally indicate a function which you shouldn’t be using (because I may change it without warning).

    Another ‘rule of thumb’, function prefixed by eo_ indicates a function you can use, and eventorganiser_ you should not.

    But use of those tags is a bit sparse, and until I go through and update the inline docs, really only functions published on the site are ones that can be (safely) used by third-party plug-ins/themes. But if you do need to use a function, just let me know so I’ can try not to break it :).

    In the meantime I’ll be ‘revealing’ more of the API with each major update.

    Stephen Harris
Viewing 6 posts - 1 through 6 (of 6 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.