WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] No logout available whatsoever (14 posts)

  1. supah
    Member
    Posted 1 year ago #

    There's no option to log out on the account page (customer account). No option to add one (as described here). Tried this too and no luck.
    Nothing works.
    If it's a matter of adding to the function.php or what.

    (And a big fat middle finger to woocommerce for trying to abandon this help forum by posting a 'read me' instead of tending to their clients.)

    http://wordpress.org/extend/plugins/woocommerce/

  2. supah
    Member
    Posted 1 year ago #

    still stuck on this problem 12 hours later. shortcode [woocommerce-logout] does not function.
    was told to go to this file for help http://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.

  3. daileycon
    Member
    Posted 1 year ago #

    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.

  4. supah
    Member
    Posted 1 year ago #

    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.

  5. daileycon
    Member
    Posted 1 year ago #

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

  6. supah
    Member
    Posted 1 year ago #

    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.

  7. daileycon
    Member
    Posted 1 year ago #

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

  8. supah
    Member
    Posted 1 year ago #

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

  9. arggasasao
    Member
    Posted 1 year ago #

    thanks Daileycon!
    its solve my problem.

  10. ashtonej
    Member
    Posted 11 months ago #

    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.

  11. chiwaili
    Member
    Posted 10 months ago #

    Thank you Daileycon, exactly what I needed

  12. JsonB123
    Member
    Posted 8 months ago #

    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

  13. alaskaash
    Member
    Posted 7 months ago #

    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.

  14. klihelp
    Member
    Posted 1 month ago #

    Use wc_get_page_id(), because woocommerce_get_page_id() is deprecated

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic