diff --git a/gravity-forms/gw-all-fields-template.php b/gravity-forms/gw-all-fields-template.php index c38d8ea33..cd48926a4 100644 --- a/gravity-forms/gw-all-fields-template.php +++ b/gravity-forms/gw-all-fields-template.php @@ -202,6 +202,11 @@ public function all_fields_extra_options( $value, $merge_tag, $modifiers, $field switch ( $modifier ) { case 'filter': if ( in_array( $field->id, $field_ids ) ) { + // In the case of a Single Product field, the $value is empty, but $raw_value contains an array. + if ( ! $value && is_array( $raw_value ) ) { + $value = GFCommon::get_lead_field_display( $field, $raw_value ); + } + $value = $this->get_all_fields_field_value( $field, $value ); } else { $value = false; @@ -423,7 +428,12 @@ public function get_submitted_fields( $form, $lead, $display_empty = false, $use // ignore product fields as they will be grouped together at the end of the grid $display_product_summary = apply_filters( 'gform_display_product_summary', true, $field, $form, $lead ); - if ( $display_product_summary ) { + + // Do not include product fields if the product/order summary will be included. + if ( + $display_product_summary + && $this->all_fields_extra_options( GFCommon::get_submitted_pricing_fields( $form, $lead, $format, $use_text, $use_admin_label ), $merge_tag, $modifiers, 'order_summary', null, $format ) + ) { break; } } elseif ( GFFormsModel::is_field_hidden( $form, $field, array(), $lead ) ) {