Support » Plugin: Events Manager » Pending Bookings

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    you can try to hook into em_booking_save filter;

    e.g.

    function my_em_booking_save($result, $EM_Booking){
      if( $EM_Booking->booking_status == 5 ){ //status 5 = offline booking
        $EM_Booking->approve(false);
      }
      return $result;
    }
    add_filter('em_booking_save','my_em_booking_save', 10, 2);

    this may even work out the box and do exactly what you want come to think of it. Problem is you’ll get two emails (i.e. pending and approved) in one go, so I added ‘false’ in there so the email doesn’t get sent the second time, so make the pending email text your approved text.

    Plugin Author Marcus

    (@netweblogic)

    there is an option to require booking approvals in SEttings > Bookings > General

    however, chances are in your implementation you would want to use $EM_Booking->approve(false) to actually approve your booking, or set booking_status to 1 in your bookings table

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pending Bookings’ is closed to new replies.