In the WooCommerce setting page I set the customers to NOT be allow to place an order without an account. Then the customer must be logged to do the checkout. I have no problem with this setting. It works fine.
Now if the customer is not logged this message is shown "You must be logged in to checkout." I just need to add a link at the end of this message.
I use this code which allows to change the text and add a link
function filter_woocommerce_checkout_must_be_logged_in_message( $message ) {
$message = 'You must be logged in to checkout. <a href="#" id="login-register">login / Register</a>';
return $message;
}
add_filter( 'woocommerce_checkout_must_be_logged_in_message', 'filter_woocommerce_checkout_must_be_logged_in_message', 10, 1 );
But the problem is that the html (the link) is printed as it (not rendered as a link).
Take a look at my capture to see what I mean.
