Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter supah

    (@supah)

    still stuck on this problem 12 hours later. shortcode [woocommerce-logout] does not function.
    was told to go to this file for help https://docs.woothemes.com/wc-apidocs/ (are all these things installed already? because i tried finding a spot to introduce some of the php to no avail). was told to “look through widget-login.php for hints on how it can be applied” i can’t even find widget-login.php to study it.

    so, if anyone knows what kind of or how many vestal virgins i need to toss into which volcano to get this to work, i’d much appreciate it.

    Your using the wrong shortcode.
    Set up a page with [woocommerce_logout] on it. Set it up in the WooCommerce page settings as the ‘logout page’. Add that page to your menus where you want the “logout” option to appear.

    Thread Starter supah

    (@supah)

    Unfortunately this was tried and it didn’t work. Here’s a screen shot of results.

    I appreciate your taking the time to mention this fix though.

    Weird. Do other shortcodes load? Are you using the latest woocommerce?

    Thread Starter supah

    (@supah)

    it is weird. the other shortcodes are functioning.
    i am running woo commerce 2.0.4 and WP 3.5.1

    i’m just kinda stuck at this point. i am crafting a not so slick workaround, but ultimately i’m going to soft launch and hope to hear back from the woo people.

    You could add a hyper link to the menu with
    https://www.YOURSITE.com/wp-login.php?action=logout
    till you get a solution. Have you submitted a support ticket with woo?

    Thread Starter supah

    (@supah)

    Yes I have. and that’s the band-aid I have in place. great minds … Thanks daileycon.

    thanks Daileycon!
    its solve my problem.

    I had the same problem. I set up the page with the logout widget but I had forgotten to add it to the logout out page entry in the woo Commerce “settings” / “page” tab. after I assigned it to log out page it worked fine.

    Thank you Daileycon, exactly what I needed

    I hope this helps someone — a “code only” solution is to add this to your theme functions file. Replace the theme_location value with the menu you would like to place these links in by adding a filter to the wp_nav_menu_items like this:

    add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 );
    function add_loginout_link( $items, $args ) {
    	if (is_user_logged_in() && $args->theme_location == 'primary') {
    			$items .= '<li><a href="'. wp_logout_url( get_permalink( woocommerce_get_page_id( 'myaccount' ) ) ) .'">Log Out</a></li>';
    	}
    	elseif (!is_user_logged_in() && $args->theme_location == 'primary') {
    			$items .= '<li><a href="' . get_permalink( woocommerce_get_page_id( 'myaccount' ) ) . '">Log In</a></li>';
    	}
    	return $items;
    }

    Credit to Kloon https://gist.github.com/kloon/4015657

    I had same problem. Solution is this: create new page with title ‘logout’
    and set parent as My account. Go to woocommerce setting -> page -> link logout to newly create page. Add the page to Menu.

    I also couldn’t see lost password link. So similar to logout page I create a new page with title Lost password. Added shortcode [woocommerce_lost_password] and set parent to My account. Updated setting in woocommerce -> page and in Menu.

    Use wc_get_page_id(), because woocommerce_get_page_id() is deprecated

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘No logout available whatsoever’ is closed to new replies.