2 thoughts on “How to display WooCommerce my account page link to logged in users – or login / register link if not logged in

  1. Hi Robin, this is excellent. What is needed to add a ‘Log Out’ link following account.

    So the logged-in user’s line is: Account | Log Out
    The guest’s user’s line is: Log In | Register

    Many thanks,

    1. Hi Kevin,

      Should be do-able using something like:

      wp_logout_url( get_permalink( wc_get_page_id( 'myaccount' ) ) )

      For the link itself. The logic behind it will be similar to the other link.

      I’ll put this on the list to make a quick tutorial… this can take a while though 🙂

Leave a Reply

Your e-mail address will not be published. Required fields are marked *