If you've ever thought about selling products online, you've likely come across the term WooCommerce.…
WooCommerce Custom Profile Picture Avatar Plugin
The custom profile picture avatar for WooCommerce is a very requested feature.
I have been receiving many requests about it.
The previous code to copy and paste into the functions.php file was getting very long and complex.
So I decided to make it a plugin, with a settings page included.
This plugin is very light weight and easy to install.
Custom Profile Picture Avatar Plugin Download
Download, install, and activate the WooCommerce custom profile picture avatar plugin:
Custom Profile Picture Avatar Settings
After activation, go to configurations page under General Settings-> Woo Profile Photo, and configure to your liking.
-Profile photo location (4 options: side column, dashoboard, settings page, and side column & settings page)
-Profile photo width and height
-Max upload size
-Allowed MIME types
Custom Profile Picture Avatar Plugin Shortcode (OPTIONAL)
OPTIONAL: Also, you can display the user avatar anywhere you like. Just use the shortcode [fepp_photo].
If you want to display certain width, use parameter “width”, in example, [fepp_photo width=400].
The user has to be logged in, otherwise, the default WordPress avatar will be shown.
These are all 3 current parameters accepted: [fepp_photo user_id=1 height=300 width=400]
Note for long time followers
IMPORTANT NOTE: If you used the old code, remove it from the functions.php file before activating the plugin.
If it is your first time here, disregard this note 🙂
Show me some love!
Please leave a comment below about what your thoughts are about the plugin.
I am open to hear all suggestions. Just send me a message or leave a comment below.
If this post helped you show some love with claps and comments, please leave a review, like, follow, share my social medias, that will help me a lot.
Facebook.com/webfor99
Instagram.com/webfor99
YouTube.com
Also you can Buy me Coffee(read support me) to keep up the good work.
Cheers.
This Post Has 86 Comments
Comments are closed.
Can I change the default non-logged-in user image?
Hi Daniel
Thanks for this great plugin! I installed it on a dev website, and it works like a charm there. On the live website however, I get this error:
Failed opening required ‘/home_pr5/i/n/mydomain.com/htdocs/wordpress/wordpress/wp-admin/includes/image.php’ (include_path=’.:/usr/share/php:’)
I can see that there are twice “wordpress/” in the path, although there’s only one “wordpress/” in the correct path. How can I fix that?
Thanks and best
Luca
Hi!
Thank you for this really cool plugin!
Upon uploading a photo, I get the error message “the link you followed has expired”, although the file limits are definitely high enough. Do you have any idea what’s causing the issue?
Thanks and best
Luca
Apologies for the late reply. I have been out for health reasons but I am back now.
For the “The Link You Followed Has Expired” error, try the solution #1 in this article:
https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-link-you-followed-has-expired-error-in-wordpress/
Add those 3 lines of code into your functions.php or in a plugin.
Don’t know why, but its not uploading anything for me.
Hello Peter, are you getting any error message?
Hi, why you don’t upload it in WordPress repository? Would be nice!
Very soon!
How can I upload the actual size without cutting the image
Hello, remove the old plugin and then download and install the plugin again. I updated it. You will find an option “Crop Avatar?” which you can set to “No Cropping”. Make sure to REMOVE the previous plugin before you install the new one. Let me know if that works for you.
Hi! I have an issue, the profile pictures of my customers are not showing when they leave a review/comment and are not showing on the admin wordpress dashboard either (exactly in the Users list). I’m using Top Store theme from themehunk.
I hope it is possible to solve.
Regards!
This Guy is Amazing!!
The Plugin was not completely aligned with my theme. I requested him to make the changes in the Plugin and the next day he emailed me that he has made the changes.
Thank You soooo much once again. 🙂
Hi there.
Is there a way to add a language file to the plugin so it can be translated?
Best regards
Runolfur G.
hi..
the plugin is great and easy to use… however i just noticed that if the image are colored, it can’t be uploaded and an error message says “File is too large” eventhough the file size is less than 300kb only. But if the image is black and white even the file size is 4mb, it can be uploaded.
any ideas or suggestions? =)
Great plugin. Was exactly what I was looking for hoever a couple of issues. Its throwing a few errors when debug is enabled:
1: Notice: Undefined offset: 1 in /home/plugins/wf99-woo-profile-photo/includes/settings-link.php on line 6 – on the admin side and frontend.
2: Deprecated: get_screen_icon is deprecated since version 3.8.0 with no alternative available. in /home/wp-includes/functions.php on line 5093 – this is on the admin side
Also tried using the options and on the account details page it works great BUT cannoyt get it to display on the sidebar for the main account page AND cannot figure out how to use the showrcode within a template for theat main page. Any pointers please?
Hi Alex,
#1 and #2 should be fixed. Re-download the plugin and re-install.
Can you explain “Also tried using the options and on the account details page it works great BUT cannoyt get it to display on the sidebar for the main account page ”
Also, copy and paste this shortcode [wf99_profile_photo] on a post or page in order to display the user avatar. NOTE: The user has to be logged in in order to see the avatar.
Thanks a lot man, your great!!!
Thank you for your kind words
Hello,
I configured the plugin with a maximum upload size of 500 KB.
Although the file size is less than 500 kb, It shows: File is too large. REF: https://prnt.sc/1e92e2a
Hello. Increase the WordPress file upload size limit.
Let me know if any issues and your feedback.
Hi, your plugin is great! However, is there any shortcode I could use ? Would need some customization.
Hello. Download and install the plugin. It is updated. Delete the other one from your website. Let me know if any issues and your feedback.
This works great, but on the “my-account” screen I get ” Notice: Undefined index: upload_msg in /var/www/wp-content/plugins/wf99-woo-profile-photo/includes/functions-display.php on line 126″ when I upload a photo.
I also have Notice: Undefined index: action in /var/www/wp-content/plugins/wf99-woo-profile-photo/includes/core.php on line 33
and
Notice: Undefined index: profile_pic in /var/www/wp-content/plugins/wf99-woo-profile-photo/includes/core.php on line 40
How can I get rid of this?
thanks!
Hello Dispareo, thanks for the feedback. I will check and get back very soon.
Hello. The Notices and Warnings were fixed. Just re-download and re-install the plugin.
This works great now, but when I add pic to personal page (user) and log into WP Admin as admin, it’s still showing the default gray. How can Admin see the profile picture under either “customers” or “users” page?
thanks again!
Hi there,
When the profile photo is uploaded as the customer in the front end, i.e. like this:
https://snipboard.io/89w0Mz.jpg
And then you login as admin and go to the user backend page, the profile photo appears like this:
https://snipboard.io/Tudr41.jpg
If it is not behaving like this, try to disable other plugins and test it with a default WordPress theme such as twenty twenty one and see how it goes. Keep me updated.
Cheers
Nice. Simple. Perfect.
Please post your paypal email so a guy can say thanks!
ml
julissa.maldonado@hotmail.com . Thank you very much
Great – just sent you $20!
Thanks for making this, works like a charm!
Only small issue I noticed is the page redirects to woo ‘acct details’ page (change email, pass, etc) after successful photo update. I have the form on the ‘dashboard’ page so ideally it’d just bounce back to there 🙂
Hi Michael, Thank you so much for the love, it helps a lot!
I will check and get back very soon.
Hello. The redirect issue was fixed. Just re-download and re-install the plugin. Thank you!
Hi there, i am trying to implement your plugin on the checkout or order received page.
Any suggestions?
Thanks
Hi, it currently works automatically for the WooCommerce my-account page.
For other locations, it could be accomplished with a shortcode.
But I don’t have an ETA for this.
Do you have a public GitHub repo that I could contribute to?
Hi Robin, no, there is not public GitHub available yet.
No problem, I have extended your functionality to get it working on the checkout page. Happy to assist you where ever if you need any assistance.
Sounds good. Send me the updated plugin. info@webfor99.com
Hi,
Thanks for the amazing plugin. I would like to add avatar to checkout page. can you please send me the Robin version who made changes to your plugin. You mentioned in one of your comments that it could be accomplished with a shortcode. Can’t wait to hear from you. Thanks.
Hello. Download and install the plugin. It is updated. Delete the other one from your website.
You can use this shortcode: [wf99_profile_photo]
Let me know if any issues and your feedback.
broooo.. you are just awesome! thanks for the plugin
it really worked like charm!
Happy to hear that. Any time.
Hi
I am trying your plugin for the WC profile as I don’t allow users to have access to the wp dashboard the WC profile MY ACCOUNT page isthe only place where a profile image can be changed.
Your plugin allows that to happen in the Edit-Account page but it doesn’t display on the dashboard image at all.
The website needs u to be loggin to view the avatar in the my accounts page and the my accounts link is in the footer section only..
the login details are as follows
USERname — Demo Account
Password — demoaccount
You can chage the image if you like .
I am using the Gravatar option in the wp settings but have tried other options with no avail either.
Not sure which code to delete in functions file if one needs to be deleted as I presume this suggestion was based on older users first attempts.
If you help it would be great otherwise I will need to find another plugin that can do this (if there is one).
Happy to donate generously if it all works well and the avatar follows the dashboard user profile as it should.
I change the demo password frequently every week so if you get this and you can’t login please email me for the new password.
Cheers
Phil
Hi Phil. The login for your site was not working.
Anyway, first of all, re-download and re-install the plugin, as I made some minor updates.
Then, go to settings->WF99 Woo Profile Photo, and play with the option “Profile Photo Location”.
I added an option to place the profile photo and upload/edit button in the Dashboard.
Let me know if that helps.
Cheers
Hi,
Thanks for a great shre, but it did not work for me.
https://prnt.sc/1153pwc
Using Buddyx free theme
I made the code a plugin. Remove the old code from the functions.php file and install and activate this plugin. There is a settings page also.
Can I use this code with previous woocommerce version?
Yes you can. I made the code as plugin. Remove the old code from the functions.php and install and activate this plugin. There is a settings page too.
It’s very useful tutorial. I try your code but there are some errors, I perhaps do some thing wrong. Anyway, Thanks for sharing.
I finally wrote the code as a plugin. Just download, install and activate the plugin. Go to the settings page and play with the setting if you need to. Remember to remove the old code in the functions.php file before activating the plugin. What errors are you receiving?
Where is the updated code? Can u share the link of the latest code or send it to my mail?
I finally wrote the code as a plugin because it was getting long and complex to copy and paste into the functions.php file. Just download, install and activate the plugin. Go to the settings page and play with the setting if you need to. Remember to remove the old code in the functions.php file before activating the plugin.
I am trying to place the display in the right column where I have all edit form fields in the left. How can I do that?
I have written the code as a plugin because it was getting long and complex to copy and paste into the functions.php file. Install and activate the plugin. Go to the settings page and you will find an option “Profile Photo Location”. Remember to remove the old code in the functions.php file before activating the plugin.
Also, on mobile the section is too big, how can I make it responsive to the screen size? Thanks!
I updated code. Replace the old code by this one.
Where is the updated code? Can you share the link or send it to my mail?
I finally wrote the code as a plugin because it was getting long and complex to copy and paste into the functions.php file. Just download, install and activate the plugin. Go to the settings page and play with the setting if you need to. Remember to remove the old code in the functions.php file before activating the plugin.
Very helpful thanks!
I was just wondering is there is a way to limit the max upload size to a specific size (like 3MB or something). Because right now I can upload very large images because the wp_max_upload_size is quite high.
Thank you!
In the code above, search for “wp_max_upload_size()”, and replace this by your desired limit.
(In example 50000 for 50Kb)
Hello! I tried it but it doesn’t work, I put it like this:
if( $profilepicture[‘size’] > 5000 )
$log->add(‘custom_profile_picture’,’It is too large than expected.’);
But it didn’t do anything. What did I do wrong?
Hello, it took me a long time but I finally wrote the code as a plugin. Just download, install and activate. Go to the settings page and update the Max Upload Size. Remember to remove the old code in the functions.php file before activating the plugin.
Wow! fantastic…. working without any extra effort..
But here I have a issue such as when customer posted own review on product page, his/her profile pictures are not showing. How to fix it?
It is working on the Storefront Woocommerce official theme.
Check: https://snipboard.io/vrkMWd.jpg
What theme are you using?
Hi Dude! I have exactly the same issue, its profile pictures are not showing when they leave a review/comment. I’m using Top Store theme from themehunk.
This was so helpful and exactly what I needed.
Thank you !
Thank you! And thank you for the tip! Let me know if I can help with anything else.
I get a fatal error with the latest code.
There has been a critical error on this website. Please check your site admin email inbox for instructions.
Maybe its me though?
Where are you adding it? It should be added in the functions.php file of your theme. You can also send me screenshots to info@webfor99.com
Hello All. I finally had a chance to check this code. Now it should be working good. Check and let me know. Cheers.
Hi
The photo does not show when we register ?!
Hello. I updated the code. Check it and let me know.
Can you make this picture show up on the dashboard page? Right now it only shows up on the “Edit Account Details” page. Can we make it show on the dashboard without the delete/edit options.
Hello. I updated the code. Check it and let me know.
I got the same issue… image appears as broken.
Hello. I updated the code. Check it and let me know.
Thank you for this. It works well in the “Account Details” area. It allows me to add an image and delete it. However, unless the user goes to the “Account Details” area, this photo is not shown anywhere else. Is it possible to have this image shown top of the “My Account” page. As shown in this screenshot: https://i.ibb.co/0yk6SNS/myaccount-s.png
Hello. I updated the code. Check it and let me know.
Thank you for making this update. Is it possible to hide the “Choose File” button and the “Upload” button from the “Dashboard” section, while keeping the image as you have it in there? Then have those two buttons only show up under the “Account Details” page as shown in this image: https://i.ibb.co/8BgrYWR/update.png
I updated the code.
Same here – works great , but it doesn’t seem to save the avatar to the user profile. once de-activated the avatar is lost. still only display the default place holder avatar.
Hello. I updated the code. Check it and let me know.
Anyone has this problem?
First of all, Thanks!!! Everything works fine.
But after upload the image, it still show the default avatar instead of newly uploaded image.
Hello. I updated the code. Check it and let me know.
I couldn’t find the your Woocommerce custom profile picture avatar when I searched in WordPress plug-ins. Can you link me? Thanks!
https://webfor99.com/woocommerce-custom-profile-picture-avatar/
Hey,
This works really well! However, it doesn’t work on mobile (Android or iPhone). Any clues?
thnks!