Reserve Your Free Seat for Our Next WooCommerce Class! Search
Business Bloomer
  • Join
  • WooCommerce Plugins
  • WooCommerce Tips
  • Log In
  • 0
  • Business Bloomer Club
  • WooCommerce Plugins
  • WooCommerce Tips
  • Log In
  • Search
  • Contact
  • Cart
WooCommerce Code Snippets My Account

WooCommerce: Add Content @ My Account Register / Login Page

Last Revised: May 2020

STAY UPDATED

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!

WooCommerce: Show Additional Content on the My Account Page
WooCommerce: Show Additional Content on the My Account Page

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>';
}

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

  • WooCommerce: Separate Login, Registration, My Account Pages
    There are times when you need to send logged out customers to a Login page and unregistered customers to a standalone Register page. As you…
  • WooCommerce: Add New Tab @ My Account Page
    One of the features of Business Bloomer Club is the provision of Premium WooCommerce Q&A Support to supporters who enroll. So, how to add an…
  • WooCommerce: How To Make A Website GDPR Compliant? (12 Steps)
    Ok, we all know that the EU General Data Protection Regulation (GDPR) will come into force on the 25th May 2018. So the main question…
  • WooCommerce Visual Hook Guide: My Account Pages
    Hey WooCustomizers, the Visual Hook Guide is back 🙂 In this episode, I’ve created a visual HTML hook guide for the WooCommerce Account Pages (there…
  • WooCommerce: Add First & Last Name to My Account Register Form
    Here’s yet another useful PHP snippet – and a mini-plugin alternative with super simple settings – that adds the Billing First Name and Billing Last…

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

32 thoughts on “WooCommerce: Add Content @ My Account Register / Login Page”

  1. Rakesh
    May 18, 2021

    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.

    Reply
    1. Rodolfo Melogli
      June 2, 2021

      Hi Rakesh, you’ll need a different hook https://www.businessbloomer.com/woocommerce-visual-hook-guide-account-pages/

      Reply
  2. Dan
    November 25, 2020

    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

    Reply
    1. Rodolfo Melogli
      November 25, 2020

      There’s always a way

      Reply
  3. Charlène
    November 4, 2020

    It still works ! thanks for that 🙂

    Reply
    1. Rodolfo Melogli
      November 4, 2020

      Great!

      Reply
  4. Morgan
    September 14, 2020

    Yes, it worked very good

    Reply
    1. Rodolfo Melogli
      September 21, 2020

      Nice

      Reply
  5. Lawrence
    May 21, 2020

    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

    Reply
    1. Rodolfo Melogli
      May 26, 2020

      Yes, you’re right. Posting an update to the snippet in a few mins

      Reply
  6. Gunther Dippe
    December 2, 2019

    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.

    Reply
    1. Rodolfo Melogli
      December 2, 2019

      Great!

      Reply
  7. Gill
    November 9, 2019

    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?

    Reply
    1. Rodolfo Melogli
      November 10, 2019

      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:

      because we do not get an automated notice that a shipping address has been updated

      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.

      Reply
      1. Gill
        November 13, 2019

        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.

        Reply
        1. Rodolfo Melogli
          November 14, 2019

          Ok!

          Reply
  8. Linda Sweeney
    December 11, 2018

    How do I add an optional phone extension to Customer Account page? Just starting to learn PHP, am designer.

    Reply
    1. Rodolfo Melogli
      December 11, 2018

      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

      Reply
  9. Dmitry
    September 16, 2018

    Nice snippet! Thank you!

    Reply
    1. Rodolfo Melogli
      September 20, 2018

      Thanks 🙂

      Reply
  10. Haizat
    June 2, 2018

    Hi Rodolfo,

    I’ve added this code into my woocommerce version 3.4.1 but it won’t work!

    Reply
    1. Rodolfo Melogli
      June 6, 2018

      Hey Haizat, thanks so much for your comment! This still works, so there must be some other error on your end 🙂

      Reply
  11. Edward Melaugh
    November 26, 2017

    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.

    Reply
    1. Rodolfo Melogli
      November 27, 2017

      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

      Reply
  12. yuda
    June 12, 2017

    Hi Rodolfo
    Does this work with Woocommerce 3.x ? Added the snippet to my themes functions.php with no change.

    Reply
    1. Rodolfo Melogli
      June 15, 2017

      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/

      Reply
  13. Javi
    March 3, 2017

    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.

    
    add_action('woocommerce_login_form','bbloomer_add_login_text');
    
    function bbloomer_add_login_text() {
    echo '';
    }
    
    

    Can you help me?…

    Thanks for all.

    Reply
    1. Rodolfo Melogli
      March 7, 2017

      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!

      Reply
  14. Tom
    May 31, 2016

    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.

    /**
     * @snippet       Show Additional Content on the My Account Page
     * @how-to        businessbloomer.com/woocommerce-customization
     * @sourcecode    https://businessbloomer.com/?p=19113
     * @author        Rodolfo Melogli, Business Bloomer
     * @compatible    WooCommerce 2.4.7
     */
     
    // Add text at My Account
     
    add_action('woocommerce_login_form_start','bbloomer_add_login_text');
     
    function bbloomer_add_login_text() {
    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>';
    }
    
    Reply
    1. Rodolfo Melogli
      May 31, 2016

      Tom, AWESOME! Thank you – I just edited the snippet and gave you credit 🙂 Have a great day, R

      Reply
      1. Tom
        May 31, 2016

        Thanks Rodolfo, keep up the good work

        Reply
        1. Rodolfo Melogli
          May 31, 2016

          Cheers Tom!

          Reply
Questions? Feedback? Customization? Leave your comment now!
_____

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Cancel reply

Your email address will not be published. Required fields are marked *


Search WooCommerce Tips

Popular Searches: Visual Hook Guides - Checkout Page - Cart Page - Single Product Page - Add to Cart - Emails - Shipping - Prices - Hosting

Recent Articles

  • WooCommerce: Save Order Currency Exchange Rate
  • WooCommerce: Get Orders Containing a Specific Product
  • WooCommerce: Sort Order Items by Name, SKU, Total, Quantity
  • WooCommerce: Add Buy Now Button @ Single Product Page
  • WooCommerce: Automatically Log Out Customers After Checkout

Latest Comments

  1. Marco on WooCommerce: Remove “Payments” From WordPress Sidebar Admin Menu
  2. Rodolfo Melogli on WooCommerce: Automatically Register Guest Checkouts
  3. Rodolfo Melogli on Moving the WooCommerce Coupon Field to a Custom Location on the Checkout Page

Find Out More

  • Become a WooCommerce Expert
  • Business Bloomer Club
  • WooCommerce Blog
  • WooCommerce Weekly
  • Contact

Contact Info

Ciao! I'm Rodolfo Melogli, an Italian Civil Engineer who has turned into an international WooCommerce expert. You can contact me here:

Twitter: @rmelogli

Get in touch: Contact Page

Business Bloomer © 2011-2025 - VAT IT02722220817 - Terms of Use - Privacy Policy

Cart reminder?

x