From 7fd08b7276a5bf73dd947940e9534ba1f6e9632d Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 18 Oct 2023 18:57:23 +0200 Subject: [PATCH] fix split name --- README.md | 5 +++-- ecomail.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5e487d1..0bac748 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,9 @@ Subscribe users during registration on the website. ### How to add subscribe checkbox to the registration form Follow this instructions if you choose **opt-in** mode -- create a user custom field type *checkbox* (Users->Fields->New) -- add a checkbox text you wish and value, value **__must be exact "subscribe"__** +- create a user custom field type *checkboxes* (Users->Fields->New) +- in the field *Checkbox values* click on the plus button +- fill the text and value fields, value **__must be exact "subscribe"__** Example: diff --git a/ecomail.php b/ecomail.php index 9eabfc3..741cb00 100644 --- a/ecomail.php +++ b/ecomail.php @@ -78,7 +78,7 @@ public function onUserAfterSave($user, $isnew, $success, $msg) if($fullName['firstName'] != ""){ $params["subscriber_data"]["name"] = $fullName['firstName']; } - if($fullName['lastName'] != ""){ + if($fullName['surname'] != ""){ $params["subscriber_data"]["surname"] = $fullName['surname']; } }