Skip to content

Commit 3ebe1cd

Browse files
committed
gpuid-generate-post-workflow.php: Added snippet to delay generation of Unique ID until a workflow step is complete.
1 parent c60d187 commit 3ebe1cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gp-unique-id/gpuid-generate-post-workflow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function prevent_unique_id_generation( $unique, $form_id, $field_id ) {
5353

5454
public function maybe_generate_unique_id( $step_id, $entry_id, $form_id, $status ) {
5555

56-
if ( $step_id == $this->_args['step_id'] && $form_id == $this->_args['form_id'] ) {
56+
if ( (int) $step_id === $this->_args['step_id'] && (int) $form_id === $this->_args['form_id'] ) {
5757
$entry = GFAPI::get_entry( $entry_id );
5858
if ( ! is_wp_error( $entry ) && empty( $entry[ $this->_args['field_id'] ] ) ) {
5959
$uid_field = GFAPI::get_field( $form_id, $this->_args['field_id'] );

0 commit comments

Comments
 (0)