Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: If title is used for first name it is stripped when outputting first name #3356

Closed
philipboomy opened this issue Dec 21, 2023 · 2 comments
Assignees
Labels
bug commerce4 Issues related to Commerce v4

Comments

@philipboomy
Copy link

What happened?

Description

When outputting first name like this $order->billingAddress->firstName it comes out with "null" if the first name is for example "Miss"

Since we are not blocking the user from entering "Miss" as first name frontend we need it to output "Miss" when using $order->billingAddress->firstName otherwise we end up with empty variables when sending order data to for example shipping fulfilment.

The above is just my opinion. Happy to be proven wrong. Just seeking a solution.

Expected behavior

Output "Miss"

Actual behavior

Output "null"

Craft CMS version

4.5.12

Craft Commerce version

4.3.2

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@rbrv
Copy link

rbrv commented Jun 18, 2024

We're having the same problem, preventing a commerce customer from paying the order.

@lukeholder
Copy link
Member

Please make sure you are on at least 4.9 and read this issue and it's solutions:

craftcms/cms#14665

Note also this option: https://craftcms.com/docs/5.x/reference/config/general.html#showfirstandlastnamefields

@lukeholder lukeholder self-assigned this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce4 Issues related to Commerce v4
Projects
None yet
Development

No branches or pull requests

3 participants