Fix: Updating Account Controller to Handle tax_identifier correctly

This commit is contained in:
2026-09-25 14:03:37 +03:00
parent fa172860db
commit 5bbf0aabcd
@@ -79,12 +79,9 @@ public function update(string $locale, Request $request): RedirectResponse
'first_name' => $data['first_name'] ?? null,
'last_name' => $data['last_name'] ?? null,
'company_name' => $invoice ? $data['company_name'] : null,
'tax_identifier' => $invoice ? $data['tax_identifier'] : null,
]);
// Written directly: core's updateProfile() allowlists `vat_no`, but
// Lunar's column is `tax_identifier`, so it can't go through there yet.
$customer->update(['tax_identifier' => $invoice ? $data['tax_identifier'] : null]);
if (filled($data['line_one'] ?? null)) {
$addressData = [
...collect($data)->only(self::ADDRESS_FIELDS)->all(),