Offline payment : Confirmation mail sent to Incomplete bookings

WordPress Event Management, Calendars & Registration Forums Report A Bug Offline payment : Confirmation mail sent to Incomplete bookings

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 4 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37131

    Hello,

    I am using the offline payment option for the booking.

    Since the introduction of the payment gateway, I get in rare cases some bookings flagged with Incomplete status but where the booking confirmation mail is sent to both the user and the admin. These mails are normally sent only to the Pending booking

    Since the Incomplete bookings don’t decrease the places count, this leads to overbooking.

    I could not clearly reproduce the behaviour.

    Thanks in advance for your advice.

    All the best!

    Jef

    zwazo
    #37134

    Hi Jef,

    Which emails are sent out? Booking confirmation emails are (should) only sent out when the booking is transitioned to the confirmed status (they are hooked onto transition_post_status). (Which might happen immediately if the booking is free).

    In the settings, under “Notify me when” do you have “A new booking is made” checked? If so, that will be sent as soon as the booking is created, but before a payment gateway is selected (and only to the admin).

    If it is the confirmation emails, add the following to your wp-config.php

    define( 'EVENTORGANISER_DEBUG', 'debug');
    

    and then add this snippet to record booking transitions:

    add_action('eventorganiser_transition_booking_status', function($new_status, $old_status, $booking){
    
            $container = eo_pro_get_container();
            $logger = $container[\EventOrganiserPro\Logger\AbstractLogger::class];
    
            $logger->debug("Booking {$booking->ID} $old_status --> $new_status");
    }, 10, 3);
    

    That will log any booking status transition, if the issue should recur that will provide some information as to what statuses the booking transitions to/from and when.

    Stephen Harris
    #37193

    Hello Stephen,

    This is the “Offline Payment Instructions” mail which is sometime sent to the bookee with incomplete status and the booking confirmation is sent to the admin as well.

    Basically the mail process is behaving like a “pending” status.

    I’ll check to include the mods you propose to log the issue.

    best regards,

    Jef

    zwazo
    #37238

    Hi Jef,

    So the offline payment gateway email should be sent after the status has been updated to ‘pending’ (i.e. status has transition from incomplete to pending). That happens when the customer opts to pay offline. The booking is then left in the pending state until manually confirmed.

    If bookings are being left in a pending state, you can opt to reserve ‘pending’ bookings (generally recommended when taking offline payments)

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 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.