In WooCommerce login page, I need to add a statement "Not a user? register now" under the login form next to "lost your password?" to let the unregistered user go easily to the registration page when pressing on this statement.
So, how can I add it?
Thanks.
Use this custom function hooked in woocommerce_after_customer_login_form
action hook this way:
add_action( 'woocommerce_after_customer_login_form', 'custom_login_text' );
function custom_login_text() {
if( ! is_user_logged_in() ){
//Your link
$link = home_url( '/register' );
// The displayed (output)
echo '<p>'. __("Not a user? <a href='$link'>register now<a/>", "woocommerce").'</p>';
}
}
Code goes in function.php file of your active child theme (or theme) or also in any plugin file.
The code is tested and works.