71
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 Get tutoraspire.com FREE
* @author Tutor Aspire (improved by Tom Lambie)
* @compatible WooCommerce 4.1
* @donate $9 https://tutoraspire.com
*/
add_action( 'woocommerce_login_form_start','tutoraspire_add_login_text' );
function tutoraspire_add_login_text() {
if ( is_checkout() ) return;
echo 'Registered Customers
If you have an account with us, log in using your email address.
';
}
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.
';
}