fix: clear Mailwizz checkboxlist tag when deleting subscriber
Encode empty checkboxlist arrays as an empty scalar so multipart requests include the field. On delete, PUT only coupon and tag fields to Mailwizz after merging the tag CSV from getSubscriber. Made-with: Cursor
This commit is contained in:
@@ -202,7 +202,8 @@ final class MailwizzService
|
||||
$out = [];
|
||||
foreach ($data as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
$out[$key] = $value;
|
||||
// Empty arrays are omitted by Laravel's multipart encoder (no KEY[] parts), so Mailwizz never clears checkboxlist fields.
|
||||
$out[$key] = $value === [] ? '' : $value;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user