Email Response Capitalization

This topic contains 7 replies, has 2 voices, and was last updated by  Stephen Harris 10 years, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #9468

    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
    #9469

    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
    #9496

    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
    #9500

    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
    #9505

    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
    #9522

    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
    #9904

    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
    #9905

    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
Viewing 8 posts - 1 through 8 (of 8 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.