A WooCommerce Customization client wanted to add some text above the “Login” and “Register” boxes on the My Account page. Understandably, users may need a bit of an explanation before they take action. Here’s how you do it!

PHP Snippet: Show Additional Content @ WooCommerce My Account Page (Logged Out Mode)
/**
* @snippet Show Additional Content on the My Account Page
* @how-to businessbloomer.com/woocommerce-customization
* @author Rodolfo Melogli, Business Bloomer (improved by Tom Lambie)
* @compatible WooCommerce 4.1
* @community https://businessbloomer.com/club/
*/
add_action( 'woocommerce_login_form_start','bbloomer_add_login_text' );
function bbloomer_add_login_text() {
if ( is_checkout() ) return;
echo '<h3 class="bb-login-subtitle">Registered Customers</h3><p class="bb-login-description">If you have an account with us, log in using your email address.</p>';
}
add_action( 'woocommerce_register_form_start','bbloomer_add_reg_text' );
function bbloomer_add_reg_text() {
echo '<h3 class="bb-register-subtitle">New Customers</h3><p class="bb-register-description">By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.</p>';
}
Hi sir, I want to add a custom made elementor section in my account page. I tried to add that section before dashboard but it still show in login window. so how can i hide that section in login and show only when some one is logged in.
Hi Rakesh, you’ll need a different hook https://www.businessbloomer.com/woocommerce-visual-hook-guide-account-pages/
Hi, been using this code for a while, thanks!
The one thing that looks a little clumsy, but that I don’t quite know how to change, is the default Woo login/register headings above the content. Using the example given, it would look better if Registered Customers and New Customers didn’t have the default Login and Register titles above them, they’re kind of superfluous IMHO. Is it easy to make them disappear?
Thanks
Dan
There’s always a way
It still works ! thanks for that 🙂
Great!
Yes, it worked very good
Nice
If you have customer login enabled on checkout page, this message shows up there too. This leads to duplication since the checkout login has its default message
Yes, you’re right. Posting an update to the snippet in a few mins
Thank you Rodolfo!
The code snippet works perfectly fine with WooCommerce 3.8.1 and WP 5.2.4. I used it with the excellent Code Snippets (2.13.3) plugin which makes it easier to add functions to WP.
Great!
Hi Rodolfo, I am a small (micro) business owner and am working to design and maintain my website myself (with no previous experience of creating a wp website or woocommerce shop) so I have found your php snippets and hook guide really helpful and generous of you, so I’d like to thank you for that first.
I have been using the snippet above to add a notice to the My Account Page request users to use our contact form to advise of any change to their shipping address not just to update it in their account because we do not get an automated notice that a shipping address has been updated and we sell products as an annual subscription that are supplied every 3 months. This snippet no longer seems to be working, I’m not sure when it stopped but I have had a couple of customers for whom I’ve had to ship replacement product out to because it had not been sent to their current address. When I decided to check why they were not emailing us with new address details I could see the notice was no longer showing up. Would you have any idea what has changed?
This still works, sorry Gill. Did you change theme or added/updated plugins? Maybe there’s a conflict and this is not showing your custom content.
In regard to:
I believe that’s a much better option than a static message on the login page. Just so you know, it can be coded and would make your life easier.
Yes – that is my aim to get a notification to our admin email when an address update is made but still trying to work out how to do it. This custom notice was something I had been able to get working before so helped in the meantime.
Thanks for confirming it should still work, I’ll try to work out which plugin might be causing the conflict.
Ok!
How do I add an optional phone extension to Customer Account page? Just starting to learn PHP, am designer.
Hey Linda, thanks for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding! ~R
Nice snippet! Thank you!
Thanks 🙂
Hi Rodolfo,
I’ve added this code into my woocommerce version 3.4.1 but it won’t work!
Hey Haizat, thanks so much for your comment! This still works, so there must be some other error on your end 🙂
Hi Redolfo,
I have used your help in the past and enjoy the great work you do. Thank you 🙂
I have run into a problem while using recaptia in the register form @ My Account page.
the recaptcha wont show when added via woocommerce settings, so I added advanced noCaptia plugin it does put the recaptcha on the form but it hides behind the register button and when I enable the recaptia in woocommerce setting then it doesnt hide anymore but it shows 2 recaptcha boxes.
Can you help with this?
Thank you
Ed.
Edward, thanks so much for your comment! Unfortunately this looks like custom troubleshooting work and I cannot help here via the blog comments. Thanks a lot for your understanding! ~R
Hi Rodolfo
Does this work with Woocommerce 3.x ? Added the snippet to my themes functions.php with no change.
Hey Yuda, thanks for your comment! Try taking a look at the updated visual hook guide, do some tests and then get back to me – it’s possible indeed: https://businessbloomer.com/woocommerce-visual-hook-guide-account-pages/
Hi Rodolfo….. Great job 🙂
I have a consultation. I have tried to change text of Login or registrer button, by a similar function, but it add a new line to html code, but not replace the original line, duplicatting code with the final result of 2 buttons.
Can you help me?…
Thanks for all.
Hey Javi, thanks for your comment! Instead of “adding” content, you’ll need to “edit” the titles – you can do so by using https://businessbloomer.com/translate-single-string-woocommerce-wordpress/. Hope this helps!
Love your visual hook guides for WooCommerce – I’ve bookmarked and constantly use them.
I made a couple of small changes to this snippet to help with the layout. The existing text that’s added isn’t wrapped in paragraph tags so it resulted in a lack of spacing between the text and the form.
Also the H3 tags didn’t contain classes (for easier styling) so I’ve added those.
Thanks again for your hard work – these guides have saved me a lot of time.
Tom, AWESOME! Thank you – I just edited the snippet and gave you credit 🙂 Have a great day, R
Thanks Rodolfo, keep up the good work
Cheers Tom!