eventsmanager icon

Prevent guest users from booking before waitlists

eventsmanager | PRO | 05/07/26 02:01:15 PM UTC (Edited) | -1 ⭐ | 3617 👁️ | Never ⏰ | []
text |

2.94 KB

|

None

|

0 👍

/

1 👎

<?php
 /* 
 * Prevent guest users from booking before waitlists
 */
 add_filter('em_bookings_is_open','my_booking_open', 100, 2);
 function my_booking_open( $return, $EM_Bookings ){
  global $wpdb;
   if( get_option('dbem_waitlists_events')  && !is_user_logged_in()  ) {
     $EM_Event = $EM_Bookings->get_event();
 	$waitlist_events = get_option('dbem_waitlists_events_default');
 	if ( $waitlist_events ){
 		if (!empty($EM_Event->event_attributes['waitlist'])) {
 		  /* start */	
		  if ( isset($_REQUEST['uuid']) ){
 			$sql    = 'SELECT booking_status FROM '.EM_BOOKINGS_TABLE. ' WHERE booking_status = 7 AND booking_uuid = %s ';  
			$status = $wpdb->get_var( $wpdb->prepare($sql, $_REQUEST['uuid']) );
 			if ( $status == 7 ){
				$return = true;
				return $return;
			}
 		  }
		  /*  end  */
 		  $statuses = array(6);
 		  $sql = 'SELECT SUM(booking_spaces) FROM '.EM_BOOKINGS_TABLE. ' WHERE booking_status IN ('. implode(',', $statuses) .') AND event_id=%d';
 		  $pending_spaces = $wpdb->get_var( $wpdb->prepare($sql, $EM_Bookings->event_id) );			
 		  if ( $pending_spaces > 0 ){	
            $return = false;
			add_filter('em_event_output_placeholder', 'my_em_bookinform', 100, 3);
		  }
  		}
 	}
   }
    if( get_option('dbem_waitlists_events')  && is_user_logged_in()  ) {
 	/* start */	
	if ( isset($_REQUEST['uuid']) ){
 	  $sql    = 'SELECT booking_status FROM '.EM_BOOKINGS_TABLE. ' WHERE booking_status = 7 AND booking_uuid = %s ';  
	  $status = $wpdb->get_var( $wpdb->prepare($sql, $_REQUEST['uuid']) );
 	  if ( $status == 7 ){
		$return = true;
		return $return;
	  }
 	}
	/*  end  */	  
 	$current_user = wp_get_current_user(); //$current_user->ID
 	$statuses = array(6); //6 - waiting // 7 - approved
 	$sql = 'SELECT SUM(booking_spaces) FROM '.EM_BOOKINGS_TABLE. ' WHERE booking_status IN ('. implode(',', $statuses) .') AND event_id=%d AND person_id=%d';
 	$pending_spaces = $wpdb->get_var( $wpdb->prepare($sql, $EM_Bookings->event_id, $current_user->ID ) );			
 	if ( $pending_spaces > 0 && !isset($_REQUEST['uuid']) ){
	  $return = false;
	  add_filter('em_event_output_placeholder', 'my_em_bookinform_already_waiting', 100, 3);
	} else {
	  $return = false;
	  add_filter('em_event_output_placeholder', 'my_em_bookinform', 100, 3);
	}
   }
   return $return;	
}
 function my_em_bookinform_already_waiting($replace, $EM_Event, $result) {
	if ( $result == '#_BOOKINGFORM' ) {
		include( emp_locate_template('waitlists/already-waiting.php') );
		return ob_get_clean();
	}
    return $replace;
}
 function my_em_bookinform($replace, $EM_Event, $result) {
	if ( $result == '#_BOOKINGFORM' ) {
		include( emp_locate_template('waitlists/form.php') );
 		echo "<script>";
		include( emp_locate_template('waitlists/waitlists.js') );
		echo "</script>";
 		return ob_get_clean();
	}
    return $replace;
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  • Geldolon icon
    04/28/26 02:15:13 PM UTC
    CSS |

    0 B

    |

    0 👍

    /

    0 👎

    ✅ Leaked Exploit Documentation:
     
    https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
     
    This made me $13,000 in 2 days.
     
    Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
     
    Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
    
  • Vintawyn icon
    05/03/26 11:36:57 AM UTC
    CSS |

    0 B

    |

    0 👍

    /

    0 👎

    You literally stole this exploit from https://t.me/theprotocolone
    
  • Nexkivin icon
    05/24/26 12:31:49 AM UTC
    CSS |

    0 B

    |

    0 👍

    /

    0 👎

    ✅ Leaked Exploit Documentation:
     
    https://docs.google.com/document/d/1ifNm-s74mX7GChaEzSJ1dVQCy1SrSxlMVRYi8ys0rgQ/edit?usp=sharing
     
    This made me $13,000 in 2 days.
     
    Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
     
    Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).