Skip to content

Commit 5ecb3ef

Browse files
committed
fullname fix
1 parent 9a42eeb commit 5ecb3ef

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

public/class-paystack-forms-public.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,22 @@ function paystack_submit_action() {
413413
function paystack_meta_as_custom_fields($metadata){
414414
$custom_fields = [];
415415
foreach ($metadata as $key => $value) {
416-
$custom_fields[] = [
417-
'display_name' => ucwords(str_replace("_", " ", $key)),
418-
'variable_name' => $key,
419-
'type' => 'text',
420-
'value' => $value
421-
];
416+
if ($key == 'pf-fname') {
417+
$custom_fields[] = [
418+
'display_name' => 'Full Name',
419+
'variable_name' => 'Full_Name',
420+
'type' => 'text',
421+
'value' => $value
422+
];
423+
}else{
424+
$custom_fields[] = [
425+
'display_name' => ucwords(str_replace("_", " ", $key)),
426+
'variable_name' => $key,
427+
'type' => 'text',
428+
'value' => $value
429+
];
430+
}
431+
422432
}
423433
return $custom_fields;
424434
}

0 commit comments

Comments
 (0)