You are missing a closing tag for the opening link (<a>) tag, try:
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 );
(You could also just spit out the login form right there instead of linking off, if you wanted):
function filter_woocommerce_checkout_must_be_logged_in_message( $message ) {
$login_form = wp_login_form( [ 'echo' => false ] );
$message="<p>You must be logged in:</p>";
$message .= $login_form;
return $message;
}
add_filter( 'woocommerce_checkout_must_be_logged_in_message', 'filter_woocommerce_checkout_must_be_logged_in_message', 10, 1 );
Related Posts:
- How do I remove the product thumbnail link from a specific div in Woocommerce? [closed]
- Function returns text instead of html [closed]
- How to remove coupon dropdown feature
- How to rename woocommerce-billing-fields
- PHP function for horizontal Woocommerce thumbnails and badges
- Remove span tags from WooCommerce Downloads page
- Use Search Term in html link and redirect
- Custom woocommerce payment gateway – Form
- sessionStorage saves input value in browser but it is not loaded in the form field
- Woocommerce custom attributes list help
- WooCommerce multiple custom fields code
- Can’t make product images clickable
- WooCommerce – Print Processing orders [closed]
- How to create a container in php then customise it in CSS
- Endpoint exists and shows up in My Account dashboard. Need to add endpoint to My Account DROPDOWN menu in Porto theme
- Edit tag cloud widget number
- Correct regex for wp_embed_register_handler
- get product attributes for current product and store it in a variable
- WordPress custom taxonomy description for each post?
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- How to get Woocommerce Variation ID? [closed]
- Add product tag names to WooCommerce new order email subject
- How to add a post or page tag to the list of classes appearing in the body tag’s class attribute?
- HTML table from shortcode with multiple parameters
- How To Change The Html of Products filtration sidebar in Woocommerce?
- How To add custom radio boxes to WooCommerce Billing page and change total price by this field?
- WooCommerce: update custom fields after checkout validation failure
- Trigger Woocommerce New User Email
- My Own layout in WooCommerce pages [closed]
- Woocommerce – remove product from category
- Inject PHP code into “sidebar-content” – code before my WooCommerce sidebar widget?
- Add the Name of Products Ordered to Admin New Order Email WooCommerce
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- get current product name in functions.php
- Get WooCommerce product details and transfer them to a custom DB table
- ACF page while loop breaks footer while loop
- Embed html in php code
- Woocommerce product variation backorder
- Status 400 for AJAX POST Request with admin-ajax.php
- WooCommerce: How can I get orders with a custom ID in order meta data object?
- Sum the total amount of a specific product purchased per user and display in table
- Customize position of social icons in upme plugin [closed]
- Position banner to right of logo in header – messed up my header file
- Make PHP work with HTML tags
- echo something inside a shortcode
- How i can get post data from database when i am getting post id from url in wordpress
- wp_insert_post() with HTML tags using PHP
- Include js script ONLY on woocommerce product category pages? [closed]
- WP_Query multiple post results
- Convert Featured products loop into Recent products loop?
- Remove   from the_excerpt
- Woocommerce order status payment
- Dynamically added custom fields not displayed on WooCommerce email notifications
- html form: redirect page after form completes submit function and posts data
- Payment field disappears on custom Paypal plugin
- Creating a brand attribute as a variable
- WordPress Post Block Element not properly parsed with the_content filter
- How do I set a hidden field to a value?
- Add other class content with reference class value
- I am having errors with checkout on wordpress
- HTML comment cause issue in functions.php script root
- Programmatically add a product to the cart and set price to zero when buying from certain category
- I want to show cart items number if any or nothing, simple CART text
- Slug duplicates once clicking on link
- How to retrieve quantity input field by id in woocommerce
- Get only relevant sub-category of category “Genre” that applies to current product only
- How to find and delete a menu item in php?
- Using zip code to display custom data in Admin Order Details
- How can I update the price when someone enters postcode or zip code in woocommerce checkout page?
- My single.php page skips the first div tag
- opens like sitename.com/URL
- How to display post meta bellow every posts
- How do I remove an action hook inside a class that is called by another class?
- Add Shortcode to ::before class
- i want add conditional for add category in wordpress
- WooCommerce get products based on the taxonomy
- append data to mysql table via submit button coded in php – not working
- random woocommerce categories are not showing when count enabled?
- Switch position of elements in the footer [closed]
- PHP – Woocommerce 3.2 Add variable shipping insurance with multiple “else if ” conditions
- Can’t get_users info by using json_encode
- scroll scrpit to particular button position to next id when click button
- how to display woocomerce description of each category in wordpress? [closed]
- WordPress 3.0 PHP Error – notice WordPress_product_Type was called incorrectly
- WooCommerce – Add product category below product price [closed]
- Adding my own custom template page but got white page
- WordPress HTML Helper
- get_post_meta is always empty when I use wp_mail
- Implement “No related posts for this entry” into the loop?
- wc_add_notice not working on cart page
- ACF | WooCommerce | Theme Development | How to include a /template-part/ that makes use of ACF’s on a custom WooCommerce homepage?
- Woocommerce – Shipping tax class based on cart items not using the highest tax available
- ACF repeater image in video poster with jquery
- Advanced Custom Fields Show PHP in Text Areas
- Grabbing value of input field inside of array
- How to set variable to specific field when querying
- WooCommerce Checkout Cart [closed]
- How can I change text on my SearchWP search results page, as this is not an editable page in WordPress?
- How to change product title color in shop page if product has specific product tag (Woocommerce)?
- I’ve added SKU to Woocommerce permalinks, but I have small issue