Support » Plugin: Events Manager » Have a client cancel a booking

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    do you have additiona screenshot which includes the full page? it seems perfectly working fine on our test sites.

    Thread Starter Chriber

    (@chriber)

    Now I’ve managed by uncommenting 3 conditions to show the link:

    <?php
    $cancel_link = '';
    /*  if( !in_array($EM_Booking->booking_status, array(2,3)) &&  get_option('dbem_bookings_user_cancellation') && $EM_Event->get_bookings()->has_open_time() ){ */ 
    $cancel_url = em_add_get_params($_SERVER['REQUEST_URI'], array('action'=>'booking_cancel', 'booking_id'=>$EM_Booking->booking_id, '_wpnonce'=>$nonce));
    $cancel_link = '<a class="em-bookings-cancel" href="'.$cancel_url.'" onclick="if( !confirm(EM.booking_warning_cancel) ){ return false; }">'.__('Cancel','events-manager').'</a>';
    /* }  */
    echo apply_filters('em_my_bookings_booking_actions', $cancel_link, $EM_Booking);
    ?>

    , but now when I click cancel, I get a warning message “You must be logged in to cancel your booking.”, see screenshot:

    https://i.imgur.com/IP4rQM7.png

    but my test user is logged in as subscriber… which has permission “manage_bookings”. With this the test user also doesn’t see his bookings in the backend… If the test user has “manage_others_bookings” he can see everyones bookings in the backend and he can cancel bookings in the frontend… What is now the problem here? Permission wrong?

    Thanks for any advice,
    Chris

    Hi Chris,
    What PHP version are you using? It should be at least 7.0. If you are still on 5.x that could cause the problems.

    Thread Starter Chriber

    (@chriber)

    Just managed to show the cancelation link with only uncommenting:

    /* && $EM_Event->get_bookings()->has_open_time() */

    https://i.imgur.com/0V8X6Da.png

    But still no luck with cancelling as subscriber…

    Thread Starter Chriber

    (@chriber)

    I use PHP 7.2…

    Thread Starter Chriber

    (@chriber)

    OK, it works now, after activating an deactivating some booking and the cancelling options, subscribers can cancel, great! Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Have a client cancel a booking’ is closed to new replies.