Skip to content

Instantly share code, notes, and snippets.

@woogist
Created December 23, 2014 15:47
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woogist/92c3c417f74e85f370ff to your computer and use it in GitHub Desktop.
Save woogist/92c3c417f74e85f370ff to your computer and use it in GitHub Desktop.
Print the customer avatar in My Account page, after the welcome message
/**
* 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_before_my_account', 'storefront_myaccount_customer_avatar', 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment