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 PageWooCommerce: 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>';
}
Share:

Leave a Reply