Plugin Directory

Changeset 2816691


Ignore:
Timestamp:
11/11/2022 02:49:18 PM (3 years ago)
Author:
chipasia
Message:

Ensure correct full name path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chip-for-gravity-forms/tags/1.0.0/class-gf-chip.php

    r2815583 r2816691  
    426426    $notes_location           = rgars( $feed, 'meta/purchaseInformation_notes'); // location for purchase notes
    427427
    428     $is_full_name_selected    = false;
    429428    $full_name_location_array = array();
    430429
     
    432431      if ( $field->type == 'name' ) {
    433432        if ($name_location != $field->id) {
    434           break;
     433          continue;
    435434        }
    436 
    437         $is_full_name_selected = true;
    438435
    439436        $full_name_location_array[$field->id] = array();
     
    467464    $full_name = rgar( $entry, $name_location, '');
    468465
    469     if ( $is_full_name_selected ){
    470       foreach($full_name_location_array[$name_location] as $full_name_location) {
    471         $full_name .= ' ' . rgar( $entry, $full_name_location);
     466    if ( !empty($full_name_location_array) ){
     467      if ( array_key_exists( $name_location, $full_name_location_array ) ) {
     468        foreach($full_name_location_array[$name_location] as $full_name_location) {
     469          $full_name .= ' ' . rgar( $entry, $full_name_location);
     470        }
     471        $full_name = trim($full_name);
    472472      }
    473       $full_name = trim($full_name);
    474473    }
    475474
Note: See TracChangeset for help on using the changeset viewer.