Skip to content

Commit

Permalink
FIX: Getresponce action error Crocoblock/issues-tracker#11896
Browse files Browse the repository at this point in the history
  • Loading branch information
yurkodmtr committed Nov 28, 2024
1 parent fc93f17 commit 7147cd9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/actions-v2/get-response/get-response-action.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ public function do_action( array $request, Action_Handler $handler ) {

$fields_map = $this->settings['fields_map'] ?? array();


foreach ( $fields_map as $param => $field ) {
if ( ! $field || empty( $request[ $field ] ) ) {
continue;
}
$contact->add_custom_field( $param, $request[ $field ] );
if ( 'name' !== $param && 'email' !== $param ) {
$contact->add_custom_field( $param, $request[ $field ] );
}
}

try {
Expand Down

0 comments on commit 7147cd9

Please sign in to comment.