Created
December 23, 2014 15:47
-
-
Save woogist/92c3c417f74e85f370ff to your computer and use it in GitHub Desktop.
Print the customer avatar in My Account page, after the welcome message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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