In the latest versions of WooCommerce, when a customer clicks the “logout” button in their account, they see a message:

You may find that you want to bypass this message and just log the user out immediately. To do so, all you need is a simple code snippet. Add this using the Code Snippets plugin, or your preferred method.

/**
 * Bypass logout confirmation.
 */
function iconic_bypass_logout_confirmation() {
	global $wp;

	if ( isset( $wp->query_vars['customer-logout'] ) ) {
		wp_redirect( str_replace( '&', '&', wp_logout_url( wc_get_page_permalink( 'myaccount' ) ) ) );
		exit;
	}
}

add_action( 'template_redirect', 'iconic_bypass_logout_confirmation' );

This checks if the logout endpoint is set, and if it is, logs the user out straight away and redirects to the My Account page. You can add any URL in place of wc_get_page_permalink( 'myaccount' ) for a different redirect location.