In this question, I have shared how to add a message above the login / register form on my-account page in WooCommerce.
Add the below code at the end of your theme’s functions.php file or you can also add the below code inside your site-specific plugin.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /** * Add a message above the login / register form on my-account page */ add_action( 'woocommerce_before_customer_login_form', 'jk_login_message' ); function jk_login_message() { if ( get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' ) { ?> <div class="woocommerce-info"> <p><?php _e( 'Returning customers login. New users register for next time so you can:' ); ?></p> <ul> <li><?php _e( 'View your order history' ); ?></li> <li><?php _e( 'Check on your orders' ); ?></li> <li><?php _e( 'Edit your addresses' ); ?></li> <li><?php _e( 'Change your password' ); ?></li> </ul> </div> <?php } } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.