When using the %first_name% and %last_name% shortcodes in the response email I am noticing that the names no longer retain their capitalization. Thus John Smith becomes john smith. Is there a way to fix this?
Regards,
JB

JB Woodruff
Hi JB,
I’ll look into this – can you confirm that the first and last name are correctly capitalised in the user’s profile? Or is this a booking by a logged-out user (in which case are they correctly capitalised in the booking admin screen?)

Stephen Harris
We are managing the site so users are booking as logged-out users. No, the user’s names are not correctly capitalised in the booking admin screen. It appears that it’s passing the correct information from the booking to the email; however, what the user is entering in the form is not being correctly being passed at the time of the booking.
User enters:
JB Woodruff
Booking Appears as:
jb woodruff
Email appears as:
jb woodruff

JB Woodruff
Mmm… I’ve tested this, but I can’t replicate it. Do you have any plug-ins installed which might try to force names / usernames to lower case?

Stephen Harris
Nothing special installed. Have Akismet, bbPress, Contact Form 7, Google XML Sitemaps and LayerSlider WP. I’m using the Bee theme on this site: http://bit.ly/1kBSQhg

JB Woodruff
That’s odd…
What you could do is insert some error_logs
( http://www.php.net/manual/en/function.error-log.php ) throughout the process and then check the error log file to see exactly where it gets changed.
E.g. (based on 1.5.3) I’d recommend logging the name at the following places in includes/booking-actions.php
: After
- Before line 400 – log the value of
$_POST['fname']
– This should be the raw value received
- after line 400 – log the value of
fname
– this is probably where it changes.
Then in includes/bookings.php
,
- Before line 94 – log
$booking['fname']
. This is the value (for logged-out users) that is saved as their first name.
Using error_log()
won’t affect your site. The logged messages should appear in an error log file, usually in the root of your WordPress installation.

Stephen Harris
Thank you for the message. Unfortunately I know little to nothing about PHP and how to do this.
I updated to v1.6 and did not resolve the issue.
Regards,
JB

JB Woodruff
Hi JB,
1.6 probably wouldn’t fix it – I’ve not been able to replicate the issue, so no changes were made to fix it. I’ve got a fairly good idea as to where this happening though – I’ll send you an e-mail.

Stephen Harris