diff --git a/gp-populate-anything/gppa-use-acf-choice-label.php b/gp-populate-anything/gppa-use-acf-choice-label.php index 569dafe99..8f16806a9 100644 --- a/gp-populate-anything/gppa-use-acf-choice-label.php +++ b/gp-populate-anything/gppa-use-acf-choice-label.php @@ -22,5 +22,10 @@ $label = get_field( str_replace( 'meta_', '', $field->{'gppa-values-templates'}['value'] ), $object->ID ); + // When the ACF field's return value as Both (Value and Label), the `$label` is an array. So, we need to get the label from the array. + if ( rgars( $label, '0/label' ) ) { + $label[0] = $label[0]['label']; + } + return $label; }, 10, 7 );