Get user first name in email template2020-11-12T02:01:42+05:30

Home Forums Core Get user first name in email template

Tagged: 

Viewing 1 post (of 1 total)
  • Author
    Posts
  • jon
    Participant
    Post count: 11

    I am overriding user-new-transaction.php email template with a new message.

    I can’t figure out how to pull in the User’s first name.

    I tried this:

    <?php $user = get_user_by(‘login’, $user_login ); ?>
    <?php $firstname = get_user_meta( $user->ID, ‘billing_first_name’ , true ); ?>

    Then inserted this where I need it but it’s blank in the email.
    <?php echo $firstname; ?>

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.