Skip to content

Commit 27621f2

Browse files
committed
gpnf-override-parent-merge-tag-on-submission.php: Fixed override parent merge tag on submission.
1 parent ba73629 commit 27621f2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

gp-nested-forms/gpnf-override-parent-merge-tag-on-submission.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,10 @@ function override_parent_merge_tags( $entry, $form ) {
7676
/**
7777
* note: if include_field_ids exists, we should ignore exclude_field_ids
7878
*/
79-
$should_include = in_array( $child_field->id, $this->include_field_ids );
79+
$should_include = empty( $this->include_field_ids ) ? true : in_array( $child_field->id, $this->include_field_ids );
8080
$should_exclude = in_array( $child_field->id, $this->exclude_field_ids );
8181

82-
if ( empty( $this->include_field_ids ) && $should_exclude ) {
83-
continue;
84-
}
85-
86-
if ( ! $should_include ) {
82+
if ( ! $should_include || $should_exclude ) {
8783
continue;
8884
}
8985

0 commit comments

Comments
 (0)