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
- Woocommerce get selected shipping zone id for the current user
- WordPress Ajax always returns a 404 error
- How to change “Shipping Calculator “field label on Cart Page – woocommerce? [closed]
- Cleanest/Fastest way to avoid calling and retrieving data from the database multiple times?
- How to show order data by multiple ID?
- Problem with Woocommerce REST API Authentication
- WordPress Wysiwyg Content not being displayed
- Remove General Tab and Plugin Tab in Settings in Woocommerce
- WooCommerce – Display variation custom field value [closed]
- Woocommerce HTML email option unavailable
- How to add SVG icon above product tab title
- How to change / delete product short description in Woocommerce
- How do I add HTML to a PHP function [closed]
- How to trash multiple post/product programmatically
- OrderItem get_total() returns lower value than $order_item->get_product()->get_price() * quantity
- WordPress automatically adding html tag around PHP code
- Missing sidebar parameter “fix” – before_content
- Setting up 2 SMTP accounts: 1 for wordpress and 1 for woocommerce
- How to get the POST TITLE using the POST ID?
- WooCommerce – Reset quantity input field when variation changes
- Custom Text in WooCommerce Order Processing Email Based on Products
- Automatically remove a canceled order in Woocommerce
- Load a page into a div with Ajax
- Converting HTML Template to WordPress Theme
- How can I apply_filters from inside a function?
- Pass Category Name, Description and Photo into variables to pass to jQuery
- Different Minimum Order Amounts based on Shipping Zone [closed]
- Displaying Woocommerce Product Category in WordPress
- Displaying custom taxonomy on WooCommerce product page
- Change “add to cart” button color based on Woocommerce product category [closed]
- Add to cart function not working for first product when cart is empty [closed]
- Woocommerce : Can’t get product info in loop
- Is there a way to hook or call a custom woocomerce template that is not part of the default templates of woocommerce?
- get taxonomy thumbnail and use it as a variable in code
- Single Quotes in .php file doesn’t load website
- How to edit HTML of my website on WordPress? [closed]
- email alert for product availability
- Create a package of products as one Item in woocommerce?
- fetch woocommerce product with custom taxonomy
- Calling function in loop causes repeat data
- After disabling WPML multi currency, the currency is still handled by the WPML
- Link to page with posts of specific type
- Displaying images outside the content
- How can i programmatically change the SKU of a product based on product variation?
- Execute PHP code only with specific user role
- Add a custom WooCommerce settings tab with sections
- Checking page before applying image restrictions while uploading
- WordPress Fresh Install Errors (Woocommerce specifically now)
- WordPress User Meta value variable into Google Gauge Chart
- Woocommerce – Exclude variation attribute on specific variation
- dynamic php menu with hidden sub-categories only showing when the category name is clicked
- couldnt show short code atts in category
- separate list of programs in html/javascript coming from php
- WooCommerce display price before add to cart [closed]
- Get the same SKU from woocommerce itself for simple and variable products
- Woocommerce checkout page – custom field checkbox value into email
- WooCommerce – template_redirect if is_checkout AND order has been paid?
- Make WooCommerce product categories only show images on homepage
- ACF under category name in shop page [closed]
- WooCommerce Quantity in Dropdown menu instead of clasic [closed]
- WP_Query To Display Product Of Brand On Taxonomy Page
- Hot to edit WooCOmmerce dashboard?
- WooCommerce subcategories help
- How to override html codes in wordpress?
- Target a specific container to style on WordPress storefront theme
- Create html tree sitemap
- How to have more than one ID included in the exclude command?
- wp_query beginner
- Pass form attributes to another php template in wordpress
- Custom HTML form using PHP – help with ajax/username validation
- How to create a php page to collect information from a html page
- WordPress using get_term to retreive slug not working as expected
- I need help implement a Javascript code into the PHP file
- Category – “No content found”
- Hide cart when empty [closed]
- Order woo products, but first products must be with acf fields
- Parse error: syntax error, unexpected ‘}’ in
- Warning: Attempt to read property “term_id” on int – Woocommerce
- Show button in header when product custom field is not empty
- WordPress 6.1.1 UTF8 Slug Limit Increase
- Woocommerce Convert existing order to the cart
- How to change shipping method title based on cart amount?
- How to add SKU and remove product title from WooCommerce url?
- Product Search in search.php
- using custom pages for myaccount in woocommerce
- How to create different templates for woocommerce single-product.php?