Been trying several different methods to display the first name of a customer in a new div I added to appear on the top of my emails, and I just keep getting errors in my code no matter what. This is what I currently have.
<?php // In case that you have only the $order object
$user_data = get_userdata( $userid );
?>
<html <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
<title><?php echo get_bloginfo( 'name', 'display' ); ?></title>
</head>
<body>
<div id="wrapper-top">
<p><?php echo 'Thank you for your order ' . $user_data->first_name . '!';?>!</p>
</div>
Any idea what might make this work?