• Patryk

    (@patryktarachon)


    Does anyone know how to change printed names to capital letters?

    I have subscribers who are added in capital letters (caps lock). I would like them to be (each part of the name) with the first capital letter.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Xaver

    (@xaverb)

    Hi Partyk,

    The fasted way is to use the filter for replaced content. So if you have an uppercase username with {firstname} you can run

    add_filter( 'mailster_replace_firstname', function( $replace, $post, $extra ) {
    return ucwords($replace);
    }, 10, 3);

    This will only change the output of the {firstname} tag and not change the actual value of the subscriber.

    Thread Starter Patryk

    (@patryktarachon)

    Hi,

    Where should I apply this filter?

    wp-functions.php?

    Because if so, the filter did not work.

    • This reply was modified 6 months, 1 week ago by Patryk.
    • This reply was modified 6 months, 1 week ago by Patryk.
    Plugin Contributor Xaver

    (@xaverb)

    We’ll explain this here: https://kb.mailster.co/adding-custom-code-to-your-website/

    Please keep in mind that we cannot give proper support here so please submit a ticket!

    Thanks!

    Thread Starter Patryk

    (@patryktarachon)

    This is exactly what I do and nothing changes. The name is still written in caps lock.

    • This reply was modified 6 months, 1 week ago by Patryk.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘First capital letter – mass change’ is closed to new replies.