WordPress at a glance
function is not described

wc_nav_menu_items() WC 1.0

Hide menu items conditionally.

No Hooks.

Return

Array. Nothing.

Usage

wc_nav_menu_items( $items );
$items(array) (required)
Navigation items.

Code of wc_nav_menu_items() WC 5.3.0

<?php
function wc_nav_menu_items( $items ) {
	if ( ! is_user_logged_in() ) {
		$customer_logout = get_option( 'woocommerce_logout_endpoint', 'customer-logout' );

		if ( ! empty( $customer_logout ) && ! empty( $items ) && is_array( $items ) ) {
			foreach ( $items as $key => $item ) {
				if ( empty( $item->url ) ) {
					continue;
				}
				$path  = wp_parse_url( $item->url, PHP_URL_PATH );
				$query = wp_parse_url( $item->url, PHP_URL_QUERY );

				if ( strstr( $path, $customer_logout ) || strstr( $query, $customer_logout ) ) {
					unset( $items[ $key ] );
				}
			}
		}
	}

	return $items;
}