fast_events_scan_reset_filter ============================= This action is triggered by scan level 6 (Reset) right before all scan entries are deleted. You can return a WP_Error here. In that case, the scan is aborted with the specified error message, and the existing scan entries are not deleted. Another option is to return the integer 9, in which case the ticket isn’t reset; instead, a normal exit scan is performed. Be careful not to include code that has a long execution time as it directly influences the response time of the mobile scan app. .. code-block:: php :linenos: `_. 3. **'scan_location'** (*string*) The location of the scan. ---- Return ------ $attr, (int) 9 or WP_Error ---- Changelog --------- .. csv-table:: :header: "Version", "Description" :width: 100% :widths: auto "2.5.0", "Introduced." ---- Examples -------- Non-member forced to exit ^^^^^^^^^^^^^^^^^^^^^^^^^ The email address is used to determine whether someone is a member or not. For members, all scans are deleted, and for non‑members a normal level 9 (exit) scan is performed. .. code-block:: php :linenos: get_var( $wpdb->prepare( "SELECT COUNT(*) FROM your_private_table WHERE email = %s", $attr['email'] ) ); if ( 0 === $count ) { return 9; } } add_filter( 'fast_events_scan_reset_filter', 'your_filter_scan_reset_filter', 10, 2 ); Log the emailaddress and date of reset ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Log the email address and the departure date in a private database table, if the email domain used in the emailaddress belongs to 'company.com' . .. code-block:: php :linenos: insert( 'your_private_table', array( 'email' => $attr['email'], 'date' => $attr['date'], ) ); } else { return new WP_Error( 'invalid_user', 'This user is not a member of the organisation', array( 'status' => 406 ) ); } } add_filter( 'fast_events_scan_reset_filter', 'your_filter_scan_reset_filter', 10, 2 );