Skip to content

Commit

Permalink
Use field data instead of options
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Feb 14, 2024
1 parent eafa240 commit 454ae46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Significance: patch
Type: update

This is behind a feature flag.
Comment: This is behind a feature flag
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ private function process_select_field( $field_data, $options ) {
$field_data['options'] = $cleaned_options;

// If the field is not required, inject an empty option at the start.
if ( isset( $options['required'] ) && false === $options['required'] && ! in_array( '', $added_values, true ) ) {
if ( isset( $field_data['required'] ) && false === $field_data['required'] && ! in_array( '', $added_values, true ) ) {
$field_data['options'] = array_merge(
array(
array(
Expand Down

0 comments on commit 454ae46

Please sign in to comment.