commerce icon indicating copy to clipboard operation
commerce copied to clipboard

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

Open philipboomy opened this issue 1 year ago • 1 comments

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

philipboomy avatar Dec 21 '23 12:12 philipboomy

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

rbrv avatar Jun 18 '24 14:06 rbrv