Skip to content

Commit 048e327

Browse files
committed
gw-consolidate-multiple-list-fields-to-single-list-field.php: Added snippet to consolidate multiple list fields to a single list field.
1 parent a9720e9 commit 048e327

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gravity-forms/gw-consolidate-multiple-list-fields-to-single-list-field.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
foreach ( $source_field_ids as $field_id ) {
2020
if ( isset( $entry[ $field_id ] ) && ! empty( $entry[ $field_id ] ) ) {
2121
$field_values = unserialize( $entry[ $field_id ] );
22-
$combined = array_merge( $combined, $field_values );
22+
$combined = array_merge( $combined, $field_values );
2323
}
2424
}
2525

2626
// Re-index the combined array.
2727
$combined = array_values( $combined );
2828

2929
// Serialize the combined array and update the target field and entry.
30-
$finalSerialized = serialize( $combined );
30+
$finalSerialized = serialize( $combined );
3131
$entry[ $target_field_id ] = $finalSerialized;
3232

3333
GFAPI::update_entry( $entry );

0 commit comments

Comments
 (0)