This commit is contained in:
franknstayn
2021-11-05 12:33:51 +08:00
parent 3aa67616aa
commit 705dd3795e
3 changed files with 33 additions and 19 deletions

View File

@@ -527,8 +527,17 @@ class PaypalController extends Controller
$other_email[] = $userdata->other_email;
}
// if ($other_email[0] != null) {
// $other_email = implode(", ", $other_email);
// $email_cc = "orders@merchbay.com" . "," . $other_email;
// } else {
// $email_cc = "orders@merchbay.com";
// }
if ($other_email[0] != null) {
$other_email = implode(", ", $other_email);
$other_email = implode(", ", array_filter($other_email, function ($value) {
return !is_null($value) && $value !== '';
}));
$email_cc = "orders@merchbay.com" . "," . $other_email;
} else {
$email_cc = "orders@merchbay.com";