Include payment gateway on booking export

WordPress Event Management, Calendars & Registration Forums General Question Include payment gateway on booking export

This topic contains 2 replies, has 2 voices, and was last updated by  Chris Dunst 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43928

    Hi Stephen, is there a way to include the payment gateway on the booking export?

    We have a client with PayPal and ‘offline payment’ enabled. ‘Reserve pending tickets’ is off.

    The client can export bookings, including ‘pending’ status bookees to output the data for those offline people. We can’t however differentiate between PayPal people who didn’t complete, and Offline payment people (who are valid, and should be chased for payment).

    At the moment they either A) output confirmed bookings, and exclude offline payment people, or B) output pending people too, but can’t tell if they’re incomplete PayPal or genuine offline payment people.

    If you have a function to hook into the export process to include the payment gateway on the booking export, that’d be ideal?

    Thanks in advance.

    Chris Dunst
    #43945

    Hi Chris,

    Yes this is possible:

    add_filter( 'eventorganiser_export_bookings_headers', function( $columns ) {
        $columns['paymentgateway'] = 'gateway';
        return $columns;
    } );
    
    add_filter('eventorganiser_export_bookings_cell_paymentgateway', function( $cell, $booking ) {
        return eo_get_booking_meta( $booking->ID, 'gateway' );
    }, 10, 2 );
    
    Stephen Harris
    #43947

    You’re a star, thanks Stephen.

    I haven’t tried it yet, but I’m sure it’ll do the job.

    All the best.

    Chris Dunst
Viewing 3 posts - 1 through 3 (of 3 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.