Woocommerce display one random product via php

You could treat products like any other post type and query using get_posts(). Limit the number of posts retrieved to 1 and change the orderby parameter to random:

$args = array(
    'posts_per_page'   => 1,
    'orderby'          => 'rand',
    'post_type'        => 'product' ); 

$random_products = get_posts( $args );

foreach ( $random_products as $post ) : setup_postdata( $post ); ?>
    <li>
        <a href="https://wordpress.stackexchange.com/questions/131796/<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>
<?php endforeach; 
wp_reset_postdata();

You could also use new WP_Query() which would be similar.