Skip to content

Commit

Permalink
Use the first item if param is array
Browse files Browse the repository at this point in the history
Fixes #1359
  • Loading branch information
takayukister committed Feb 3, 2024
1 parent b1066c2 commit 7d07644
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/sendinblue/sendinblue.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,18 @@ function wpcf7_sendinblue_collect_parameters() {
}
}

$params = array_map(
function ( $param ) {
if ( is_array( $param ) ) {
$param = wpcf7_array_flatten( $param );
$param = reset( $param );
}

return $param;
},
$params
);

$params = apply_filters(
'wpcf7_sendinblue_collect_parameters',
$params
Expand Down

0 comments on commit 7d07644

Please sign in to comment.