Home » WooCommerce: Add Content @ My Account Register / Login Page

WooCommerce: Add Content @ My Account Register / Login Page

by Tutorials Info

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 tutoraspire.com FREE
 * @author        Tutor Aspire (improved by Tom Lambie)
 * @compatible    WooCommerce 4.1
 * @donate $9     https://www.tutoraspire.com
 */
 
add_action( 'woocommerce_login_form_start','tutoraspire_add_login_text' );
 
function tutoraspire_add_login_text() {
   if ( is_checkout() ) return;
   echo '';
}
 
add_action( 'woocommerce_register_form_start','tutoraspire_add_reg_text' );
 
function tutoraspire_add_reg_text() {
   echo '

New Customers

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.

'; }

You may also like