Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* Print the customer avatar in My Account page, after the welcome message
function storefront_myaccount_customer_avatar() {
$current_user = wp_get_current_user();
echo '<div class="myaccount_avatar">' . get_avatar( $current_user->user_email, 72, '', $current_user->display_name ) . '</div>';
add_action( 'woocommerce_account_content', 'storefront_myaccount_customer_avatar', 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.