• Resolved stf512

    (@stf512)


    Hello,

    I use the option that people need to have an account to checkout. So the checkout page is blocked. At that moment you’ll get the message “You must be logged in to checkout”.

    To improve that customers don’t have to search where to click next, i want to add extra text with an hyperlink.

    I found this code work perfectly but HTML is not working in ‘MY MESSAGE’ area.

    function filter_woocommerce_checkout_must_be_logged_in_message( $message ) {
        $message = 'MY MESSAGE';
        return $message; 
    }
    add_filter( 'woocommerce_checkout_must_be_logged_in_message', 'filter_woocommerce_checkout_must_be_logged_in_message', 10, 1 );

    So far i got this but html is not displayed on my end.

    function filter_woocommerce_checkout_must_be_logged_in_message( $message ) {
        $message = '<span>You must be <a href="#"logged in</a></span>';
        return $message; 
    }
    add_filter( 'woocommerce_checkout_must_be_logged_in_message', 'filter_woocommerce_checkout_must_be_logged_in_message', 10, 1 );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add login link at the checkout page when not logged in’ is closed to new replies.