WooCommerce pages accessible to logged in members only

I just tested this and it will work. Drop this into your functions.php and whenever a user who isn’t logged in tries to access a WooCommerce template such as the shop, product pages, cart, or checkout it will redirect them to the WordPress login page.

add_action( 'template_redirect', 'redirect_users_not_logged_in' );
/**
 * Redirect non logged-in users to login page when they try to access any
 * woocommerce template including the cart or checkout page.
 * 
 * @author      Joe Dooley - Developing Designs
 * @return      void
 *
 */
function redirect_users_not_logged_in() {

    if ( ! is_user_logged_in() && ( is_woocommerce() || is_cart() || is_checkout() ) ) {

        auth_redirect();

        exit;
    }
}