• Resolved chamster

    (@chamster)


    Hi. I need to require that customers create an account before they can check out. I have done the following:

    – Unchecked “Enable guest checkout” in WC checkout settings.
    – Disabled all plugins except WC.

    But still, customer clicks “Checkout” from the shopping cart and they are able to check out without creating an account. They should be required to create an account and be logged in before they can see the checkout page.

    Is there some other setting I’m missing? Thanks!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Add this function into functions.php from current theme:

    add_action( 'template_redirect', 'woo_restirct_checkout' );
    function woo_restirct_checkout() {
    
        if ( !is_user_logged_in() && is_checkout() ) {
    
            $my_account_url = get_permalink( get_option('woocommerce_myaccount_page_id') );
            wp_redirect( $my_account_url );
            exit;
    
        }
    }

    Hi @chamster,

    Can you try the following?
    * Update to the latest version of WooCommerce (3.3.4 right now)
    * Disable all plugins except WooCommerce

    Let me know if that works!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woocommerce Not Requiring Account to Checkout’ is closed to new replies.