Created
February 2, 2024 11:04
-
-
Save MjHead/e264aebc5f02b8785df44877d635a177 to your computer and use it in GitHub Desktop.
JetFormBuilder. Add custom unique ID to request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'jet-form-builder/custom-action/iterate-submissions', function( $request, $action_handler ) { | |
$uid = get_option( '_my_uid', false ); | |
if ( ! $uid ) { | |
$uid = 1; | |
} | |
jet_fb_context()->update_request( $uid, '_uid' ); | |
$uid++; | |
update_option( '_my_uid', $uid ); | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment