Business Bloomer
  • About
  • WooCommerce Blog
  • Online Courses
  • Login
  • 0
  • About
  • WooCommerce Blog
  • Online Courses
  • Login
  • 0

WooCommerce: Add Content @ My Account Register / Login Page

> Published: Dec 2015 - Revised: May 2020
> Blog Category: WooCommerce Tips
> Blog Tags: My Account
> Blog Comments: 32 Comments
Tweet

Join 17,000+ WooWeekly subscribers

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        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli (improved by Tom Lambie)
 * @compatible    WooCommerce 4.1
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */
 
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>';
}

Related posts:

  1. WooCommerce: Add New Tab @ My Account Page
  2. WooCommerce: Add First & Last Name to My Account Register Form
  3. WooCommerce: Change User Role for New Customers
  4. WooCommerce: Add Select Field to “My Account” Register Form
  5. WooCommerce: Add Privacy Policy Consent @ My Account Registration
  6. WooCommerce: Separate Login, Registration, My Account Pages
  7. WooCommerce: Allow Users to Edit Processing Orders
  8. WooCommerce: Deny Automatic Login Upon Registration @ My Account
  9. WooCommerce: Rename “My Account” If Logged Out @ Nav Menu
  10. WooCommerce: Add a Custom Download File @ My Account

Where to add this snippet?

You can place PHP snippets at the bottom of your child theme functions.php file (delete "?>" if you have it there). CSS, on the other hand, goes in your child theme style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my free video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything worked as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting on PHP 7.3.

If you think this code saved you time & money, feel free to join 14,000+ WooCommerce Weekly subscribers for blog post updates or 250+ Business Bloomer supporters for 365 days of WooCommerce benefits. Thank you in advance :)

Need Help with WooCommerce?

Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!

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
Category: WooCommerce Tips
Tag: My Account

Post navigation

Previous post: WooCommerce Visual Hook Guide: Archive / Shop / Cat Pages
Next post: WooCommerce: Add Product to Cart On Visit Programmatically

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        Get CustomizeWoo.com FREE
     * @sourcecode    https://businessbloomer.com/?p=19113
     * @author        Rodolfo Melogli
     * @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? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. 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 BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)

Cancel reply

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

Recent Posts
  • WooCommerce: Related Products Custom Heading & Subheading
  • WooCommerce: Display Stock Status For External Products
  • WooCommerce: Display Product Grid @ Order Emails e.g. Related Products
  • WooCommerce: Capitalize All Product Names
  • WooCommerce: Add a Third Description @ Single Product Page
About Business Bloomer

With 100,000 (and growing) monthly organic sessions, Business Bloomer is the most consistent, most active and most complete WooCommerce development/customization blog.

Of course this website itself uses the WooCommerce plugin, the Storefront theme and runs on a WooCommerce-friendly hosting.

Join 75,000+ Monthly Readers & 16,500+ Subscribers.

Become a Business Bloomer Supporter.

Join BloomerArmada and become an Official Business Bloomer Supporter:
easy-peasy, and lots of perks for you.
See your Benefits →
Popular Searches: Visual Hook Guides - Checkout Page - Cart Page - Single Product Page - Add to Cart - Emails - Shipping - Prices - Hosting
Latest Articles
  • WooCommerce: Related Products Custom Heading & Subheading
  • WooCommerce: Display Stock Status For External Products
  • WooCommerce: Display Product Grid @ Order Emails e.g. Related Products
  • WooCommerce: Capitalize All Product Names
  • WooCommerce: Add a Third Description @ Single Product Page
Latest Comments
  • Rodolfo Melogli on WooCommerce: Separate Login, Registration, My Account Pages
  • Rodolfo Melogli on WooCommerce: Separate Login, Registration, My Account Pages
  • Rodolfo Melogli on WooCommerce: Related Products Custom Heading & Subheading
  • Rodolfo Melogli on WooCommerce: Switch Shop Columns Responsively
Find Out More
  • Become a WooCommerce Expert
  • WooCommerce Blog
  • WooCommerce Online Courses
  • WooCommerce Weekly
  • Bloomer Armada
  • Affiliate Program
  • 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:

Email: [email protected]

Twitter: @rmelogli

Hire me by the hour: Get Quote »

VisaMastercardAmexPayPal Acceptance Mark
Business Bloomer © 2011-2023 - Terms of Use - Privacy Policy